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.41Medium

What will be the memory size of the following struct? struct Point { int x; char c; int y; }

Q.42Medium

What is the correct way to initialize an array of 5 integers with all elements as 0?

Q.43Medium

Which of the following correctly declares a pointer to a pointer?

Q.44Easy

What is the output of sizeof(char) in C?

Q.45Medium

What is the scope of a variable declared inside a function in C?

Q.46Easy

How many times will the loop execute? for(int i = 0; i < 5; i++)

Q.47Medium

What is the difference between calloc() and malloc() in C?

Q.48Easy

What will be the value of x after: int x = 5; x += 3;

Q.49Medium

What is the correct syntax to open a file in C?

Q.50Medium

Consider the following code: int arr[] = {1, 2, 3, 4, 5}; int *ptr = arr; What is the value of *(ptr + 2)?

Q.51Medium

What is the output of the following code? for(int i = 1; i <= 3; i++) { if(i == 2) continue; printf("%d ", i); }

Q.52Hard

What happens when you try to access an array element beyond its size in C?

Q.53Medium

What is the output of: int x = 10; printf("%d", x++); printf("%d", x);

Q.54Hard

Which of the following is the correct way to pass a string to a function in C?

Q.55Easy

What is the size of int data type in a 32-bit system?

Q.56Easy

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

Q.57Easy

In C, which operator has the highest precedence?

Q.58Easy

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

Q.59Medium

Which of the following correctly declares a pointer to an integer?

Q.60Medium

What will be printed if char ch = 'A'; printf("%d", ch); is executed?