C Fundamentals MCQs

303 questionsC-ProgramPage 6 of 34

Practice free C Fundamentals multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 303 questions — no login required.

Question 46easy
Which of following is not a valid name for a C variable?
Question 47easy
Find the output of the following program. void main() { int i=01289; printf("%d", i); }
Question 48easy
Find the output of the following program.
void main()
{
   int i=065, j=65;
   printf("%d %d", i, j);
}
Advertisement
Question 49easy
If ASCII value of 'x' is 120, then what is the value of the H, if H = ('x' – 'w' ) / 3;
Question 50easy
What is the difference between a declaration and a definition of a variable?
Question 51easy
"My salary was increased by 15%" Select the statement, which will EXACTLY reproduce the line of text above.
Advertisement
Question 52easy
short testarray[4][3] = { {1}, {2,3}, {4,5,6}};
printf("%d", sizeof(testarray));

Assuming a short is two bytes long, what will be printed by the above code?
Question 53easy
What will be the output of the following C code?
#include <stdio.h>
void main()
{
    int x = 97;
    char y = x;
    printf("%c\n", y);
}
Question 54easy
Will the following C code compile without any error?
#include <stdio.h>
int main()
{
    for (int k = 0; k < 10; k++);
        return 0;
}
C Fundamentals MCQs with Answers & Solutions — C-Program | GrabStudy