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
Which of the following is the correct way to define a function that takes no parameters and returns no value?
What is the output of the following program: int x = 5; if(x > 3) printf("Greater"); else printf("Smaller");?
In C, when passing arrays to functions, what is actually passed?
What will be the output of: int a = 5; int *p = &a; printf("%d %d", a, *p);?
Which header file is required for using the printf() function?
What is the correct syntax to declare a constant in C?
Which operator is used to access the value at an address in C?
What does the sizeof() operator return?
Which of the following is a correct way to initialize a 1D array in C?
What is the return type of the malloc() function?
Which function is used to release dynamically allocated memory in C?
What is the difference between calloc() and malloc()?
Which of the following is used to comment multiple lines in C?
What will be the output of: float x = ; printf("%f", x);
How are structures different from unions in C?
What does the static keyword do when used with a global variable?
Consider: int arr[10]; int *p = arr; What is p[5] equivalent to?
What is the difference between declaration and definition in C?
What will be the output of the following code? int a = 5; int b = ++a + a++; printf("%d", b);
What is the size of an empty structure in C?