Question For C Programing Rajesh
Question For C Programing Rajesh
Question For C Programing Rajesh
(3) C is a _______.
a) Low level language b) High level language
c) Medium level language d) None of the above
(9) Which is the correct format specifier for double type value in C?
a) %d b) %f
c) %lf d) %LF
(15) Increment (++) and decrement (--) are the ___ operators in C?
a) Unary b) Binary
c) Ternary d) None of the above
(19) Which statement is required to execute a block of code when the condition is false?
a) for b) if
c) else d) All of these
(21) Multiple values of the same variable can be tested using ___.
a) Switch b) for
c) Function d) All of these
(23) What will happen if the loop condition will never become false?
a) Program will throw an error b) Program will loop infinitely
c) Loop will not run d) None of these
(25) When the condition of the do-while loop is false, how many times will it execute the
code?
a) 0 b) 1
c) Infinite d) All of these
(27) Which format specifier is used to read and print the string using printf() and scanf()
in C?
a) %c b) %str
c) %p d) %s
(34) Let x is an integer array with three elements having value 10, 20, and 30. What will
be the output of the following statement? printf("%u",x);
a) Prints the value of 0th element (i.e., 10)
b) Prints the garbage value
c) An error occurs
d) Print the address of the array (i.e., the address of first (0th) element
(41) Which of the below syntax is the correct way of declaring a function?
a) return function_name () { } b) data_type function_name (parameter) { }
c) void function_name ( ) d) None of these
(42) Before using a pointer variable, it should be ___.
a) Declared b) Initialized
c) Both A. and B. d) None of the above
(49) Which function checks the end-of-file indicator for the given stream in C?
a) eof() b) EOF
c) feof() d) None of the above