C MCQs for placement and exams - Set 2

C MCQs for placement and exams - Set 2


1.) Can you use the fprintf() to display the output on the screen?
a.) Yes
b.) No
View Answer / Hide Answer

ANSWER: a.) Yes




2.) The function that calls itself for its processing is known as.
a.) Inline Function
b.) Nested Function
c.) Overloaded Function
d.) Recursive Function
View Answer / Hide Answer

ANSWER: d.) Recursive Function




3.) In C, if you pass an array as an argument to a function, what actually gets passed?
a.) Value of elements in array
b.) First element of the array
c.) Base address of the array
d.) Address of the last element of array
View Answer / Hide Answer

ANSWER: c.) Base address of the array




4.) The library function used to find the last occurrence of a character in a string is
a.) strnstr()
b.) laststr()
c.) strrchr()
d.) strstr()
View Answer / Hide Answer

ANSWER: c.) strrchr()




5.) Who calls to the fuction main()
a.) kernel
b.) operating system
c.) cpu
d.) ALU
View Answer / Hide Answer

ANSWER: b.) operating system




6.) What is the result of 16>>2?
a.) 4
b.) 8
c.) 3
d.) 0
View Answer / Hide Answer

ANSWER: a.) 4




7.) The size of a structure can be determined by

a. size of variable name
b. size of (struct tag)"

a.) Only a
b.) Only b
c.) Both a and b
d.) None of these options
View Answer / Hide Answer

ANSWER: c.) Both a and b




8.) A program is a:
a.) Javascript for a theatrical play
b.) Set of implementations
c.) A list of instructions (actions) to accomplish a task
d.) What you watch on TV
View Answer / Hide Answer

ANSWER: c.) A list of instructions (actions) to accomplish a task




9.) In mathematics and computer programming, which is the correct order of mathematical operators ?
a.) Addition, Subtraction, Multiplication, Division
b.) Division, Multiplication, Addition, Subtraction
c.) Multiplication, Addition, Division, Subtraction
d.) Addition, Division, Modulus, Subtraction
View Answer / Hide Answer

ANSWER: b.) Division, Multiplication, Addition, Subtraction




10.) Which of the following cannot be checked in a switch-case statement?
a.) Character
b.) Integer
c.) Float
d.) enum
View Answer / Hide Answer

ANSWER: c.) Float


Post your comment

    Discussion

  • RE: C MCQs for placement and exams - Set 2 -Manpreet Singh (01/30/16)
  • 16>>2 is 4 not 8.
  • RE: C MCQs for placement and exams - Set 2 -charishma (10/12/15)
  • ans for 6th question:
    Right shift 2 bits for 10000, then 00100.
  • RE: C MCQs for placement and exams - Set 2 -K Vanisri (09/23/15)
  • The answer given for Q-6 is wrong because correct answer is 4