NSK - TAMILAN ULAGAM

NSK - TAMILAN ULAGAM
NSK - DIPLOMA

Monday, September 8, 2025

Programming in C EEE MCQ QUESTIONS

 PROGRAMMING IN C IMPORTANT MCQ

UNIT I – INTRODUCTION TO C PROGRAMMING


Q1. C language was developed by:

a) Dennis Ritchie

b) James Gosling

c) Bjarne Stroustrup

d) Ken Thompson

👉 Answer: a) Dennis Ritchie


Q2. Which of the following is NOT a feature of C?

a) Portability

b) Structured language

c) Object-oriented programming

d) Rich set of operators

👉 Answer: c) Object-oriented programming


Q3. Which of the following is a keyword in C?

a) main

b) for

c) printf

d) scanf

👉 Answer: b) for


Q4. The smallest individual unit in a C program is called:

a) Constant

b) Token

c) Operator

d) Variable

👉 Answer: b) Token


Q5. Which data type is used to store a single character?

a) int

b) char

c) float

d) double

👉 Answer: b) char


Q6. What is the correct order of writing and executing a C program?

a) Link → Compile → Run

b) Compile → Link → Run

c) Run → Compile → Link

d) None of these

👉 Answer: b) Compile → Link → Run



---


UNIT II – C LANGUAGE BASICS


Q1. Which of the following is NOT a data type in C?

a) int

b) float

c) double

d) string

👉 Answer: d) string


Q2. The operator == in C is used for:

a) Assignment

b) Equality checking

c) Increment

d) Subtraction

👉 Answer: b) Equality checking


Q3. Which operator has the highest precedence in C?

a) +

b) *

c) ()

d) =

👉 Answer: c) ()


Q4. Type casting in C is done using:

a) ()

b) {}

c) []

d) <>

👉 Answer: a) ()


Q5. The correct syntax for input in C is:

a) scanf("%d", a);

b) scanf("%d", &a);

c) scanf("%d");

d) scanf(a, "%d");

👉 Answer: b) scanf("%d", &a);


Q6. Which function is used to display output in C?

a) display()

b) show()

c) printf()

d) output()

👉 Answer: c) printf()



---


UNIT III – STATEMENTS


Q1. The statement used for multi-way branching in C is:

a) if

b) if–else

c) switch

d) goto

👉 Answer: c) switch


Q2. Which statement causes an unconditional jump in C?

a) break

b) continue

c) goto

d) return

👉 Answer: c) goto


Q3. The else part of an if–else statement executes when:

a) Condition is true

b) Condition is false

c) Both a and b

d) None

👉 Answer: b) Condition is false


Q4. In C, every switch statement must have:

a) default case

b) at least one case

c) break after every case

d) None of the above

👉 Answer: b) at least one case


Q5. Which statement is best for decision making with multiple choices?

a) if

b) if–else

c) switch

d) goto

👉 Answer: c) switch


Q6. Which of the following is NOT a branching statement?

a) if

b) switch

c) while

d) goto

👉 Answer: c) while



---


UNIT IV – ARRAYS AND STRINGS


Q1. Array elements are always stored in:

a) Random locations

b) Contiguous memory locations

c) Registers

d) Heap only

👉 Answer: b) Contiguous memory locations


Q2. The valid declaration of an array in C is:

a) int arr(5);

b) int arr[5];

c) arr int[5];

d) int arr;

👉 Answer: b) int arr[5];


Q3. Which string function is used to find the length of a string?

a) strlen()

b) strcpy()

c) strcat()

d) strcmp()

👉 Answer: a) strlen()


Q4. To copy one string into another we use:

a) strcat()

b) strcpy()

c) strcmp()

d) strrev()

👉 Answer: b) strcpy()


Q5. The array index in C starts from:

a) 0

b) 1

c) -1

d) Any value

👉 Answer: a) 0


Q6. The function strrev("C") will return:

a) "C"

b) "CC"

c) "C" reversed

d) Error

👉 Answer: a) "C"



---


UNIT V – FUNCTIONS AND STRUCTURES


Q1. Which of the following is a built-in math function in C?

a) add()

b) pow()

c) max()

d) square()

👉 Answer: b) pow()


Q2. The function sqrt(25) will return:

a) 5

b) 25

c) 12.5

d) Error

👉 Answer: a) 5


Q3. A user-defined function must be:

a) Declared

b) Defined

c) Called

d) All of these

👉 Answer: d) All of these


Q4. A group of different data items under a single name in C is called:

a) Array

b) Structure

c) Function

d) Union

👉 Answer: b) Structure


Q5. The correct function call syntax is:

a) func;

b) func[];

c) func();

d) call func;

👉 Answer: c) func();


Q6. Which keyword is used to define a structure in C?

a) struct

b) str

ucture

c) record

d) define

👉 Answer: a) struct




Programming in C EEE MCQ QUESTIONS

 PROGRAMMING IN C IMPORTANT MCQ UNIT I – INTRODUCTION TO C PROGRAMMING Q1. C language was developed by: a) Dennis Ritchie b) James Gosling c...