Vous êtes sur la page 1sur 4

Intermediate Part II Short Questions

C Language
1. What is variable initialization?

2. Write shortcut key to compile a program.

3. How are comments added on multiple lines?

4. How does a compiler work?

5. Differentiate between ‘area’ and area.

6. Give an example of preprocessor directive.

7. List at least four data types used in C Language.

8. Write C Statement to print the value of an integer n.

9. What do you know about format specifier?

10. Find the error:

Main() {
printf(“Hello”
)
}

11. Describe the used of ampersand(&) in scanf function.

12. Determine the output of the following code segment:

float p=3.14159;
printf(“p=%5.1f”,p);
13. Define Computer Program.
14. What is the first step in develop a program in C Language?
15. How can you save a C Program in editor?
16. Explain Long Double Data Type.
17. What is Arithmetic Underflow?
18. Define Increment Operator.
19. Differentiate between Constant and Variable.
20. Define getch() function.
21. Why \\ escape sequence character is used?
22. Find the error:

void main()

{ float y=10; printf(“\c ”,y)

23. Explain %4d field width specifier.


24. In which header file, scanf() function is present?
25. What is Linking a C Program?
26. How can you set the output directories in Turbo C++ Editor?
27. What is main() function?
28. Why Assignment Operator is used?
29. Why Logical Operators are used? Give an example.

http://informationtechnology.pk https://www.facebook.com/it4all.pk
30. What is Character Constant? Give an example.
31. What is Long Integer in C?
32. Write C Statement to print the value of a character c.
33. What do you know about field width specifier?
34. Explain %5d field width specifier.
35. In which header file, scanf() function is present?
36. Define Constant Macro.
37. Give any one example of Define Macro.
38. Write the Syntax of main() function.
39. What is a Variable?
40. How multiline comments are added in C Program?
41. What is Data Type of an Expression?
42. What are unary operators? Give an example.
43. Write C Statement to print the value of a float height.
44. How can you format Floating Point Number while printing?
45. Find the error:
main()
{ float x;
x=getch(“”);
}
46. What escape sequence character is used to print a Backspace and Tab?
47. Determine the output of the following code segment: int p=96; printf(“p\n=\n%d”,p);
48. What is Body of main Function?
49. Define Statement Terminator.
50. Why printf() function is used?
51. What is the symbol of modulus operator?
52. How single line comments are added in C Program?
53. Define arithmetic overflow.
54. Why arithmetic operators are used?
55. Explain getche() function.
56. Why C is called a Strongly typed language?
57. Find the error:
main() {
int a=10; printf(‘&d’,a);
}
58. What is the ASCII code for Escape Key?
59. Determine the output of the following code segment: printf(“Escape Sequence is a \”Cool\”
feature of C.”);
60. Define Runtime Error.
61. What is Assembly Language?
62. Define Structured Programming Language.
63. What is Identifier in C?
64. Define Keyword in C.
65. What is Numeric Constant?
66. Write any four Relational Operators.
67. How can you round of 47.5987456 to two decimal point using printf and field width specifier?
68. Can you use characters using scanf function? Give an example.

http://informationtechnology.pk https://www.facebook.com/it4all.pk
69. Find the error:
main() {
int a=9.5; printf(“&f”,a)
}
70. Write the syntax of getch function..
71. Determine the output of the following code segment: int p=12; printf(“p=%d”,a++);
72. Write an expression in C Language for “Number is divisible by 5”
73. Define sentinel value.
74. Define control structure.
75. Define Function. Why is it used in a program?
76. What is conditional operator? Write the syntax of conditional operator.
77. What is the use of File Pointer?
78. What is the use of if-else statement?
79. Write two uses or advantages of loop.
80. What is the scope of local variable?
81. Write an expression in C Language for “age is from 18 to 25”
82. What is the difference between Nested if and Sequence of ifs?
83. Why default label is used in switch statement?
84. Write the Syntax of Conditional Operator.
85. For how many times, initialization statement in for loop will execute if loop executes for 10
times?
86. Can we use while loop in for loop?
87. What do you know about return_type of a function?
88. What is function call?
89. Why fclose() function is used?
90. Write an expression in C Language for “temperature is less than 40.0 and greater than 5.0”
91. If we omit the braces from the body of if statement, which error message will appear?
92. Differentiate between inner and outer if statement.
93. Give an example of ternary operator.
94. What do you know about nested loops?
95. Which loop is called counter loop?
96. What is function header?
97. Define scope of a variable.
98. Describe string.
99. Write an expression in C Language for “speed is not greater than 80”
100. What data type may be used in switch selection statement?
101. Is position of default label is fixed in switch statement?
102. What do know about inner loop?
103. Which statement is used to transfer control unconditionally?
104. How many expressions are there in for loop statement? Write all of them.
105. Define local variable lifetime.
106. Define lifetime of a variable.
107. Which function is used to copy a string to an array of characters?
108. Write an expression in C Language for “w is either equal to 6 or not greater than 3”
109. What is Repetition Structure?
110. Can we use if statement without else?
111. Draw the flow chart for if-else statement.

http://informationtechnology.pk https://www.facebook.com/it4all.pk
112. Define Iteration.
113. In which loop structure, condition is tested at the end of loop?
114. Can a function return more than value? If yes, how?
115. Why return statement is used in functions?
116. Write the syntax of fputs() function.
117. Write an expression in C Language for “y is greater than x and less than z”
118. Can we use else without if statement?
119. Draw the flow chart for nested if statement.
120. What is if-else-if statement?
121. What is conditional operator? Write the syntax of conditional operator.
122. Write the syntax of do-while loop?
123. Which variable is declared outside of all blocks?
124. Why functions are used in programs?
125. Write the syntax of fgets() function.

http://informationtechnology.pk https://www.facebook.com/it4all.pk

Vous aimerez peut-être aussi