iGET

Computer Knowledge - MCQ Practice Questions

Practice free Computer Knowledge multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

309 questions | 100% Free

Q.21Easy

Which header file is required to use the printf() function?

Q.22Easy

In C, which operator has the highest precedence?

Q.23Easy

What is the purpose of the break statement in a loop?

Q.24Easy

In C programming, which of the following is NOT a valid data type?

Q.25Easy

What will be the output of: int a = 10; int b = 20; int c = a + b; printf("%d", c);?

Q.26Easy

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

Q.27Easy

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

Q.28Easy

Which header file is required for using the printf() function?

Q.29Easy

What is the correct syntax to declare a constant in C?

Q.30Easy

Which operator is used to access the value at an address in C?

Q.31Easy

What does the sizeof() operator return?

Q.32Easy

Which of the following is a correct way to initialize a 1D array in C?

Q.33Easy

What is the size of an empty structure in C?

Q.34Easy

What will be the output of: char *s = "Hello"; printf("%d", strlen(s));

Q.35Easy

What will be the output of: #define MAX 10; int x = MAX; printf("%d", x);

Q.36Easy

Which of the following correctly initializes a 2D array?

Q.37Easy

What will be the output of: printf("%d", );

Q.38Easy

What does the getchar() function do?

Q.39Easy

What will be the output of: int a = 5, b = 5; if(a == b) printf("Equal"); else printf("Not Equal");

Q.40Easy

Which header file is essential for using the printf() function in C?