Programming MCQs

Objective Questions on C with answer set-2

Pinterest LinkedIn Tumblr
This set of objective questions on C includes the collection of multiple-choice objective questions on C programming language along with their answers. It includes multiple-choice questions on keywords, pointers, and variables used in C.

1. Hierarchy decides which operator
A) is the most important
B) is used first
C) is the fastest
D) Operates on largest numbers

2. A pointer can hold
A) Single address at a time
B) Two addresses at a time
C) Number of addresses at a time
D) No address

3. An integer constant in C must have
A) At least one digit
B) At least one decimal point
C) A comma along with digits
D) Digits separated by commas

4. main() {
                Int a=3, b=2, c*d*e;
                d=&a; e=&b;
                Which one of the given answers is correct?
A) a=4, c-6
B) a=3, c=5
C) a=3, c=6
D) a=3, c=8

5. In C a variable cannot contain
A) Blank Spaces
B) Decimal Point
C) Hyphen
D) All of the above

Read Also: MCQ on C Programming With Answers 

6. Assume that variable x resides at memory location 1234, y at 1111, and p at 2222.
                Int x=1, y=2, *p;
What will be the value of y after the execution of the above code?
A) 2
B) 1
C) 1234
D) 1111

7. Which of the following is FALSE in C?
A) Keywords can be used as variable names
B) Variable names can contain a digit
C) Variable names do not contain a blank space
D) Capital letters can be used in variables

8. If an integer occupies 4 bytes and a character occupies 1 byte of memory, each element of the following structure would occupy how many bytes?
                struct name {
                int age;
                char name[30];
A) 30
B) 32
C) 34
D) 36

9. The expression x=4+2 % -8 evaluates to
A) -6
B) 6
C) 4
D) None of the above

10. A structure brings together a group of
A) items of the same data type
B) related data items and variables
C) integers with user-defined names
D) floating points with user-defined names


1. B) is used first
2. A) Single address at a time
3. A) At least one digit
4. B) a=3, c=5
5. A) Blank Spaces
6. B) 1
7. A) Keywords can be used as variable names
8. C) 34
9. B) 6
10. B) related data items and variables

Read Next: Solved MCQ of Programming in C set-3


Shuseel Baral is a web programmer and the founder of InfoTechSite has over 8 years of experience in software development, internet, SEO, blogging and marketing digital products and services is passionate about exceeding your expectations.

1 Comment