C1 Chicken
C2 Sundae
C3 Cokefloat
C4 Siopao
C5 Burger
100

What is the purpose of the main function in a C program?

Entry point of the program

100

How do you access the third element of an array named numbers in C?

numbers[2]

100

What is the result of the expression 5 / 2 in C?

2

100

Which statement is used for multiple conditional branches in C?

if

100

What is the difference between printf and scanf in C?

printf is for formatted output, and scanf is for formatted input

200

Which of the following is the correct way to declare an integer variable named count?

int count;

200

What is the purpose of the #include directive in C?

Include a library

200

How do you initialize an array of integers with values 1, 2, 3, and 4 in C?

int arr[] = {1, 2, 3, 4};

200

In a switch statement, what happens if there is no break statement after a case?

Control transfers to the next case

200

How do you comment a single line in C?

// Comment

300

What is the size of the float data type in bytes?

4

300

What is the difference between int and float data types in C?

int is for integers, and float is for floating-point numbers

300

How many times will the following for loop execute? 

for (int i = 0; i < 5; i++) {

    // Code here

}


 4

300

What is the purpose of the void keyword in a function declaration?

 It indicates that the function returns no value.

300

How do you find the length of an array in C?

With the sizeof function

400

Which statement is used to terminate the execution of a loop in C?

break

400

What is the correct way to declare and initialize a string in C?

char str[] = "Hello";

400

What is the result of the expression 5 & 3 in C?

a

400

What is the result of the expression 5 & 3 in binary?

001

400

What is the index of the first element in an array in C?

0

500

What is the purpose of the return statement in a function?

To return a value from the function

500

What does the sizeof operator in C return?

Size of a variable in bytes  

500

Which of the following is a valid way to declare a constant in C?

const int x = 10;  

500

What will be the output of the following code snippet? 

int i = 5;

printf("%d", ++i + i++);


12

500

Which of the following is true regarding the fgets function in C?

It reads a line of text from a file or the standard input