Sie sind auf Seite 1von 3

REVISION SHEET- COMPUTER

GRADE X

I. Answer the following in one word:

a) A data type modifier modified to take less memory than an integer.


b) The format specifier of double data type.
c) The data type used to define non numerical data.
d) The size of an integer data type.
e) A data type modifier that can be used to tell that no signed bit is needed in the specified data type.
f) A convenient way to associate constant values with names.

II. Predict the output.

a) #include <stdio.h>
enum month {jan= 1,feb, march = 5, april, may = 10,
june, july};

int main()
{
printf("%d %d %d %d %d %d %d",jan,feb,march,april,may,june,july);
);
return 0; }

b) int main()
{
int a=5;
label:
Printf(hello world);
if(a==5)
{
Goto label;
}
printf(out of goto);
return 0;
}
c) Void main()
{
int num=2;
while(num<=4)
{
Printf(%d,num);
num =num+2;
}
}

ANSWER THE FOLLOWING

1. Explain the working of do-while loop with syntax and example.


2. Explain the difference between break and continue statement
3. Explain about the data type modifiers each with example.
4. Define function.
5. Explain the working of goto statement with a program.
6. Explain the difference between for, while and do-while loop.
7. Explain enumeration.
8. List the difference between break and continue statement .
9. Define function. Give any one function used under #include<conio.h >
10. What is the use of switch statement ?
11. How is enumerated data type useful in c.
12. How is do-while loop different from while loop. Explain with syntax
and program.
13. What is the use of goto statement in c. Give an example program for
the same.
14. Explain the different built in mathematical functions in C.

WRITE THE FOLLOWING PROGRAM

1. Write a C program to find out the area of the different shapes using
SWITCH-CASE Statement
Circle: = r2
Rectangle: = w h
Area=Side*Side
Triangle= b h
2. Write a program to print even numbers from 100 to 50 using do-while loop.
3. Write a program to find the product of n numbers using continue statement
4. write a program to swap two numbers without the third variable
5. Write a program to find factorial of a number entered by the user
6. Write a program to print sum of first ten natural numbers.
7. Write a program to find the sum of all positive numbers till the user enters a zero.
8. Write a program to calculate income tax of an employee based on the basic pay .
9. Write a program to find area of triangle using herons formula.
10. Write a program to print odd numbers from 99 to 49 using do-while loop.
11. Write a program to find the product of n numbers using continue statement.
12. Write a program to find the area of any 2 geometrical shape using switch.
13. Write a program to swap two numbers without the third variable.
14. Write a program to print the working timings of DEWA office by getting the day from the user.
16. Write a program to find the sum of all positive numbers entered by the user until user enters 0.

Das könnte Ihnen auch gefallen