Course Content
Detailed Content of Programming in C
0/1
Introduction
0/1
Structure of C program
0/1
Answers of ‘C’ Pointers Programs
0/1
About Lesson

Program Using C Data Types

1. Write a C program that takes two integer inputs from the user, performs addition, subtraction, multiplication, and division operations, and displays the results. Use appropriate data types.

2. Create a program that prompts the user to enter a single character. Display its ASCII value, convert it to uppercase, and then display the modified character. Use appropriate data types.

3. Develop a program that calculates the area of a circle. Prompt the user to enter the radius (a floating-point value), perform the calculation, and display the result with two decimal places.

4. Write a program that checks whether a given integer is even or odd. Take the input from the user and use an appropriate data type for the variable.

5. Define an enumeration for days of the week. Write a program that takes a number as input (1 for Monday, 2 for Tuesday, etc.), and displays the corresponding day using a switch statement.

6. Write a program that takes two integers as input, performs bitwise AND, OR, and XOR operations, and displays the results.