C Multiple Choice Questions

  1. How to make an infinity loop in C?
    1. loop: ..... goto loop;
    2. for(;;) { }
    3. while(1) { }
    4. All of the above
Answer :
D
Explanation:
Added By : Raju

  1. What does the following declaration mean? int (*ptr) [10];
    1. ptr is an array of pointers of 10 integers.
    2. ptr is a pointer to an array of 10 integers.
    3. ptr is an array of 10 integers.
    4. None of the above
Answer :
B
Explanation:
Added By : Rohan


  1. The correct way to round off a floating number x to an integer value is
    1. y = int (x + 0.5)
    2. y = (int) (x + 0.5)
    3. y = (int) x + 0.5
    4. y = (int) ((int)x + 0.5)
Answer :
B
Explanation:
Added By : Mayank

  1. Which of the following has compilation error in C?
    1. int n = 32;
    2. char ch = 65;
    3. float f = (float) 3.2;
    4. None of the above
Answer :
D
Explanation:
Added By : Naresh

  1. What is default storage class of variables in C language?
    1. extern
    2. local
    3. auto
    4. global
Answer :
C
Explanation:
Added By : Sandip Walunj

  1. Representation of data structure in memory is known as
    1. Recursive
    2. Abstract data type
    3. Storage structure
    4. File structure
Answer :
B
Explanation:
Added By : Kiran Kumar


  1. Which of the following search algorithm requires a sorted array?
    1. Linear search
    2. Hash search
    3. Binary search
    4. All of these
Answer :
C
Explanation:
Added By : Kiran Kumar

  1. The largest element of an array index is called its
    1. Lower bound
    2. Upper bound
    3. Range
    4. All of the above
Answer :
B
Explanation:
Added By : Kiran Kumar

Social Sharing
Search