0% found this document useful (0 votes)
3 views3 pages

Programming in C Mcq

The document contains multiple-choice questions related to the C programming language, covering topics such as keywords, data types, operators, and programming concepts. It includes questions about the history of C, syntax rules, and operator precedence. An answer key is provided at the end for reference.

Uploaded by

hsumi173028
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Programming in C Mcq

The document contains multiple-choice questions related to the C programming language, covering topics such as keywords, data types, operators, and programming concepts. It includes questions about the history of C, syntax rules, and operator precedence. An answer key is provided at the end for reference.

Uploaded by

hsumi173028
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

ST JOSEPH'S POLYTECHNIC COLLEGE -KRISHNAGIRI

DEPARTMENT OF ELECTRONIC AND COMMUNICATION


ENGINEERING

PROGRAMMING IN C PRACTICAL-MCQ QUESTIONS

NAME: REGNO: DATE: BATCH: TIME:

a.) Keywords b.) Variables

1.) Developer of 'C' language is c.) Constants d.) All of above

a.) Dennis Richie 8.) Which is the valid range of "int" data
type?
b.) Ken Thompson
a.) 0 to 256
c.) Bill Gates
b.) -32768 to +32767
d.) Peter Norton
c.) -32767 to +32768
2.) C language developed in
d.) No particular range
a.) 1970 c.) 1976
9.) Which symbol is used to terminate a
b.) 1972 d.) 1980 statement?
3.) C is level language. a.)! b.) # c.) \m d.);
a.) High. c.) Middle 10.) Which escape sequence character is a
line terminator?
b.) Low d.) Machine
a.) \a b.) \b c.) \m d.) \n
4.) C is available for which OS?
11.) Which escape sequence character is used
a.) DOS b.) Windows
to beep from speaker?
c.) Unix d.) All of above
a.) \a b.) \b c.) \m d.) \n
5.) Which symbol is used for pre-processor
12.) Character constants should be enclosed
statement?
between
a.)! b.) # c.)~ d.);
a.) Single Quotes b.) Double Quotes
6.) Which of the following is a scalar data
c.) Both A and B d.) None of these
type?
13.) String constants should be enclosed
a.) Float b.) Union c.) Array d.) Pointer
between

a.) Single Quotes b.) Double Quotes


7.) Which of the following are tokens in C?
c.) Both A and B d.) None of these
14.) Which of the following is invalid? c.) Take no argument d.) Evaluated first

a.)' ' b.)" " c.) a d.) 'abc' 25.) The bitwise AND is used for

15.) The maximum length of a variable in C a.) Masking b.) Comparison.


is
c.) Division d.) Shifting bits
a.) 8 b.) 16 c.) 32 d.) 64
26.) The operator is used for
16.) The maximum size of 'float' variable is
a.) Shifting bits to left b.) Shifting bits to right
a.) 1 byte b.) 2 bytes c.)4 bytes d.)8bytes
c.) Equality Checking d.) None of these
17.) The maximum size of "double' variable
is 27.) Which of the following has the
HIGHEST precedence?
a.) 1 byte b.) 2 bytes c.) 4 bytes d.) 8 bytes
a.)* b.)= = c.) =>d.) ()
18.) A declaration of float a; double b;
occupies 28.) The associability of operator is

a.) 1 byte b.) 6 bytes c.) 10 bytes d.) 12 a.) Right to Left c.) None of these
bytes b.) Left to Right d.) All of above
19.) The size of a string variable is 29.) Which operator has LOWEST priority?
a.) 1 byte b.) 10 bytes c.) 20 bytes d.) Not a.) ++ b.) % c.) || d.) ()
specific
30.) Which operator has HIGHEST priority?
20.) Which is an example of compounded
assignment statement? a.) () b.) || c.) % d.) ++

a.) a= 5 b.) a=b c.) a=b=c d.) a+=10

21.) The operator&&is used for

a.) Value assignment b.)Logical compariso

c) Increment by 1 d.) Condition Checking

22.) The operator&is used for

a.) Bitwise AND b.) Logical AND

c.) Pointer to the variable d.) None of these

23.) The equality operator is represented by

a.):= b.).EQ c.)= d)= = Answers Key

24.) Operator's precedence determines which 1. a) Dennis Ritchie

operator is 2. b) 1972

3. c) Middle
a.) Faster b.) Take less memory
4. d) All of the above (DOS, Windows, Unix)
5. b) #

6. a) Float

7. d) All of the above (Keywords, Variables, Constants)

8. b) -32768 to +32767

9. d) ; (semicolon is indeed used to terminate statements)

10. d) \n

11. a) \a

12. a) Single Quotes

13. b) Double Quotes

14. d) 'abc'

15. c) 32

16. c) 4 bytes

17. d) 8 bytes

18. d) 8 bytes

19. d) Not specific

20. c) a += 10

21. d) Condition Checking

22. a) Bitwise AND

23. d) ==

24. d) Evaluated first

25. a) Masking

26. a) Shifting bits to left

27. Should be d) (), parentheses have the highest precedence

28. b) Left to Right

29. C) ||

30. d) `()`

You might also like