C Multiple Choice Questions

  1. What is the right way to access value of structure variable book{ price, page }?
    1. printf("%d%d", book.price, book.page);
    2. printf("%d%d", price.book, page.book);
    3. printf("%d%d", price::book, page::book);
    4. printf("%d%d", price->book, page->book);
Answer :
A
Explanation:
Added By : Mukesh

  1. An array elements are always stored in _________ memory locations.
    1. Sequential
    2. Random
    3. Sequential and Random
    4. None of the above
Answer :
A
Explanation:
Added By : Rohit


  1. What is right way to Initialization array?
    1. int num[6] = { 2, 4, 12, 5, 45, 5 } ;
    2. int n{} = { 2, 4, 12, 5, 45, 5 } ;
    3. int n{6} = { 2, 4, 12 } ;
    4. int n(6) = { 2, 4, 12, 5, 45, 5 } ;
Answer :
A
Explanation:
Added By : Rohit

  1. What is an array?
    1. An array is a collection of variables that are of the dissimilar data type.
    2. An array is a collection of variables that are of the same data type.
    3. An array is not a collection of variables that are of the same data type.
    4. None of the above.
Answer :
B
Explanation:
Added By : Rohit

  1. Which of the following shows the correct hierarchy of arithmetic operations in C
    1. / + * -
    2. * - / +
    3. + - / *
    4. * / + -
Answer :
D
Explanation:
Added By : Nitin Goyal

  1. Which of the following is allowed in a C Arithmetic instruction
    1. []
    2. {}
    3. ()
    4. None of the above
Answer :
C
Explanation:
Added By : Nitin Goyal


  1. A C variable cannot start with
    1. An alphabet
    2. A number
    3. A special symbol other than underscore
    4. both (b) and (c)
Answer :
D
Explanation:
Added By : Nitin Goyal

  1. C programs are converted into machine language with the help of
    1. An Editor
    2. A compiler
    3. An operating system
    4. None of the above
Answer :
B
Explanation:
A compiler is a system software that converts high level language into machine level language.
Added By : Nitin Goyal

Post Your Question
Social Sharing
Search