C Programming: MCQ Set – 06

Q51: Literal means

  • (A) A string
  • (B) A string constant
  • (C) A character
  • (D) An alphabet

Q52: If an integer occupies 4 bytes and a character occupies 1 bytes of memory, each element of the following structure would occupy how many bytes?

struct name
{
int age;
char name [20];
}
  • (A) 5
  • (B) 24
  • (C) 21
  • (D) 22

Q53: By default real number is treated as

  • (A) Float
  • (B) Double
  • (C) Long double
  • (D) Far double

Q54: Output of following Program

main() {
long i = 30000;
printf(“%d”, i); 
}
  • (A) 3000
  • (B) 30000
  • (C) -1
  • (D) 0

Q55: ‘C’ allows a three-way transfer of control with the help of

  • (A) Unary operator
  • (B) Relational operator
  • (C) Ternary operator
  • (D) Comparison operator

Q56: What is the correct value to return to the operating system upon the successful completion of a program?

  • (A) -1
  • (B) 1
  • (C) 0
  • (D) Programs do not return a value.

Q57: Usually, an algorithm will contain a number of procedural steps which are dependent on results of previous steps and is called _______________.

  • (A) Flowchart
  • (B) Chart
  • (C) Drawing Chart
  • (D) Program

Q58: Which of the following metric does not depend on the programming language used ?

  • (A) Line of code
  • (B) Function count
  • (C) Member of token
  • (D) All of the above

Q59: What is the output of the following program segment?

main()
{
int i = 1;
do
{
printf(“%d..”, i);
}
while(i--);
}
  • (A) 0..1..
  • (B) 1..0..
  • (C) 0
  • (D) -1

Q60: The break statement causes an exit

  • (A) Only from the innermost loop
  • (B) Only from the innermost switch
  • (C) From the innermost loop or switch
  • (D) From the program

Answer:

QuestionQ51Q52Q53Q54Q55Q56Q57Q58Q59Q60
AnswerBBBBCCABBC

≪ Previous | Next ≫