P.K.R. Arts College For Women: (Autonomous) Gobichettipalayam - 638 475
P.K.R. Arts College For Women: (Autonomous) Gobichettipalayam - 638 475
K1: Remember Level: (To assess whether the student could remember or Recall the facts, terms, basic concepts
the lesson learned.) Refer guidelines to set QPs.
How many bytes does the int data type typically use on a 32-bit system?
A) 1 byte
4 B) 2 bytes
C) 8 bytes
D) 4 bytes
a) int array[5];
1 b) int array{5};
c) int array(5);
d) int array<5>;
What is an array?
What is a structure in C?
A) A method for defining functions
B) A collection of different data types grouped together
5 C) A type of loop
D) An array of integers
What is a pointer in C?
A) A type of variable that stores a number
B) A variable that stores the address of another variable
UNIT: V
Faculty Name:
men
75
Semester: I
e/Subject: PROGRAMMING IN C
rogramming language?
e character in C?
n C?
ry.
e. B
king statement in C?
ement in C?
ment in a loop?
B
C?
ppen if x is 5?
d in C?
ed as a:
string in C?
le values
a
B
e
any value?
s a member of a structure?
rouped together
B
pointer variable?
rs?
ber
another variable
B
erations in C?
C
P.K.R. Arts College for Women
(Autonomous)
Gobichettipalayam - 638 475
MCQ 2024-2025
WRITE-UP SHEET
Program: BCA & BSC(IT) & B.Sc(CS) Branch: COMPUTER SCIENCE
Course Code No.
24CSU01/24ITU01/24CAU01 Title of the Course/Subject: PROGRAMMING IN C
K2: Understand Level: (To assess whether the student understood the concepts, principles and Models taught in
the class and makes sense out of it.) Refer guidelines to set QPs
Which of the following correctly assigns the value 5 to the variable count?
3 A) count == 5;
B) 5 = count;
C) count := 5;
D) count = 5;
What is the correct way to define a symbolic constant for the value 100 in C?
4 A) #define 100 PI
B) const int PI = 100;
C) #define PI 100
D) int PI = 100;
Which operator is used to get the remainder of a division in C?
A) /
5 B) %
C) *
D) -
Answer: C) %
What will the following code print if a = 10 and b = 20? if (a
< b) {
printf("a is less than b");
} else {
printf("a is not less than b");
1 }
A) a is less than b
B) a is not less than b
C) No output
D) Syntax error
Given the following code, what will be the output if num = -5? if
(num > 0) {
printf("Positive");
2 } else if (num < 0) {
printf("Negative");
} else {
printf("Zero");
}
A) Positive
B) Negative
C) Zero
D) No output
I
What will be the output of the following code if count = 3? while
(count > 0) {
UNIT: II
What will be the output of the following code if choice = 5?switch (choice) {
case 1:
printf("One");
break;
5 case 2:
printf("Two");
break;
default:
printf("Invalid");
}
A) One
B) Two
C) Invalid
D) No output
a) To execute loops
b) To store multiple values of the same data type under one variable name
c) To handle file I/O
d) To define constants
How would you access the element at row 2, column 3 in a 2D array called matrix?
2 a) matrix[3][2];
b) matrix(2,3);
c) matrix[2][3];
d) matrix{2,3};
a) 10
b) 12
UNIT: III
c) 24
d) 20
UNIT: III
a) scanf()
b) gets()
c) printf()
d) strcpy()
What is a key element of user-defined functions that allows for data input?
A) Return type
B) Function body
C) Parameters
2 D) Function name
What happens when a recursive function does not have a termination condition?
A) open()
B) create()
UNIT: V
3 C) fopen()
D) fileopen()
A) "r"
B) "w"
4 C) "a"
D) "rb"
How can you access the value of a variable using its pointer?
A) ptr*
B) *ptr
5 C) &ptr
D) ptr->
Faculty Name:
en
Semester: I
bject: PROGRAMMING IN C
integer variable in C?
A
om the user in C?
C
inder of a division in C?
10 and b = 20? if (a
B
g code if count = 3? while
execute? for
n programming? b
e? c
al calculations.
B
ination condition. B
ata simultaneously.
ures.
types. B
same.
le with specific values?
ointers in C?
ddress of a variable?
C?