C Programming MCQ - Variables & Datatypes

14. Which of the following can have different meaning in different contexts?

A. &
B. *
C. Both A and B
D. None of the above

View Answer


15. Which of the following is not a valid declaration in C?
    1. short int x;
    2. signed short x;
    3. short x;
    4. unsigned short x;

A. 1 and 2
B. 2 and 4
C. 3 and 4
D. All are valid

View Answer


16.The minimum number of temporary variable needed to swap the content two variables is?

A. 2
B. 3
C. 0
D. 1

View Answer


17.What is short int in C programming?

A. The basic data type of C
B. Qualifier
C. Short is the qualifier and int is the basic datatype
D. All of the mentioned

View Answer


18. The precedence of arithmetic operators is (from highest to lowest)?

A. %, *, /, +, -
B. %, +, /, *, -
C. %, +, -, *, /
D. +, -, %, *, /

View Answer


19. Which of the following data type will throw an error on modulus operation(%)?

A. int
B. char
C. float
D. long

View Answer


20.Relational operators cannot be used on:

A. String
B. float
C. long
D. structure

View Answer







Also check :


Discussion


* You must be logged in to add comment.