Computer Knowledge - MCQ Practice Questions
Practice free Computer Knowledge multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.
304 questions | 100% Free
What will be the value of x after executing: int x = 5; x += 3; x *= 2;
Which of the following correctly describes the relationship between arrays and pointers in C?
What is the output of the expression: * 3 in C?
Which preprocessor directive is used to include a custom header file?
What is the difference between a function declaration and a function definition in C?
Which of the following is the correct way to declare a pointer to a function that returns an int and takes two int parameters?
Which of the following is NOT a valid variable name in C?
What will be the output of: printf("%d", 5 + 3 * 2);?
What keyword is used to create a pointer variable in C?
What is the correct syntax to pass a 2D array to a function in C?
What will be printed by: int x = 5; printf("%d", ++x + x++);?
Which of the following correctly uses the ternary operator?
What is the purpose of the const keyword when used with a pointer?
What is the return type of malloc() function?
In the expression: int arr[10]; what is arr[5]?
Consider: int *p, q; What is the type of q?
What is printed by: char s[] = "hello"; printf("%zu", sizeof(s));?
What will be the result of: 5 % 2 * ?
In a struct, how is memory allocated for union members?
What is the output of: int a = 10, b = 20; int *p = &a, *q = &b; printf("%d", *p + *q);?