iGET

Computer Knowledge - MCQ Practice Questions

Computer Science questions in competitive exams stay close to fundamentals, which is good news if you revise the right five subjects. Coverage includes data structures, algorithms and complexity, operating systems, database management systems, computer networks, and computer organisation. Explanations show the trace or the state table where one helps, since seeing the intermediate steps is what makes the concept stick.

304 questions | 100% Free

Q.161Easy

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

Q.162Hard

Which of the following correctly describes the relationship between arrays and pointers in C?

Q.163Medium

What is the output of the expression: * 3 in C?

Q.164Easy

Which preprocessor directive is used to include a custom header file?

Q.165Hard

What is the difference between a function declaration and a function definition in C?

Q.166Hard

Which of the following is the correct way to declare a pointer to a function that returns an int and takes two int parameters?

Q.167Easy

Which of the following is NOT a valid variable name in C?

Q.168Easy

What will be the output of: printf("%d", 5 + 3 * 2);?

Q.169Easy

What keyword is used to create a pointer variable in C?

Q.170Medium

What is the correct syntax to pass a 2D array to a function in C?

Q.171Medium

What will be printed by: int x = 5; printf("%d", ++x + x++);?

Q.172Medium

Which of the following correctly uses the ternary operator?

Q.173Medium

What is the purpose of the const keyword when used with a pointer?

Q.174Medium

What is the return type of malloc() function?

Q.175Medium

In the expression: int arr[10]; what is arr[5]?

Q.176Hard

Consider: int *p, q; What is the type of q?

Q.177Hard

What is printed by: char s[] = "hello"; printf("%zu", sizeof(s));?

Q.178Hard

What will be the result of: 5 % 2 * ?

Q.179Hard

In a struct, how is memory allocated for union members?

Q.180Medium

What is the output of: int a = 10, b = 20; int *p = &a, *q = &b; printf("%d", *p + *q);?