Saturday, February 18, 2012

Turbo C Practice Questions

Question No 01
True and False:
I. Turbo C is a case sensitive language.
II. Integer type variable can store character values.
III. Compiler translates the source code into machine language.
IV. The linker combines all your source code lines and makes .exe file.
V. The format specifier %ld is used for printing special characters. 

Question No 02 30 marks
Write a program that takes a number from user, calculates its cube and prints the result.

Question No 03 30 marks
Write a program that takes the pressure sensor voltage from user, calculates and prints the pressure according to the following formula.
p=2(v/5+14)
Where ‘v’ is the pressure sensor voltage and ‘p’ is the calculated pressure. Following is the output of program.
Please Enter the Pressure Sensors voltage : 25
The calculated pressure is : 38

Question No 04 30 marks
Write a program that calculates the coordinates (x,y) from the following equation. Use for loop.
y=5x+3
Take the values of ‘x’ from 1 to 13. Following is the output of program.

x=0, y=3
x=1, y=8
x=2, y=13
and so on up to x=13.


Question No 01 10 marks
True and False:

I. The following statement is correct.
unsigned int twelve;
II. Character type variable can store character and unsigned decimals only.
III. The compiler converts the binary files into executable files.
IV. The following statement is correct.
scanf(“%f %d”, &&years);
V. The format specifier %lc is used for printing long characters. 

Question No 02 30 marks
Write a program that takes three numbers from user, calculates their average and prints the result.

Question No 03 30 marks
Write a program that takes a number from user and prints all the even numbers up to the entered number.
Following is the output of program.
Please Enter the number : 16
The even numbers up to 16 are
2 6 8 10 12 14 16

Question No 04 30 marks
Write a program that takes a number from user and prints its table up to 12. Following is the output of program. Use for loop.
Please Enter the Number : 13
The table of 13 is
13x1=13
13x2=26
13x3=39
and so on up to 13x12=156

No comments:

Post a Comment