Programming for Problem Solving (3110003) MCQs

MCQs of Fundamentals of C

Showing 51 to 60 out of 107 Questions
51.
What will be the output of following code.

{

    int x = 10, y=15;

    x = x++;

    y = ++y;

    printf(“%d, %d \n” , x, y);

}

(a) 10, 15
(b) 10, 16
(c) 11, 16
(d) 11, 15
Answer:

Option (b)

52.
Any C program
(a) Must contain at least one function
(b) Need not contain any function
(c) Needs input data
(d) None of the above
Answer:

Option (a)

53.
Which is a correct ‘C’ expression?
(a) z = (x+y);
(b) z = [x+y];
(c) z = {x+y};
(d) z = {(x+y)};
Answer:

Option (a)

54.
If we want to increment the value of sum by 1. Which of following should be used?
(a) sum++;
(b) sum = sum+1;
(c) sum += 1;
(d) all of above
Answer:

Option (d)

55.
Which of following is not a valid assignment expression?
(a) y = 22;
(b) s = x;
(c) y % = 6;
(d) z = 5 = 3;
Answer:

Option (d)

56.
What should be written in the program to get newline on the screen?
(a) printf(“\n”);
(b) echo “\\n”;
(c) printf(‘\n’);
(d) printf(“ \\n “);
Answer:

Option (a)

57.
ASCII value of ‘a’ is
(a) 97
(b) 65
(c) 47
(d) None of the above
Answer:

Option (a)

58.
A float requires ______bytes in memory
(a) 2 bytes
(b) 1 byte
(c) 8 bytes
(d) 4 bytes
Answer:

Option (d)

59.
Which of the following operator is used to select a member of a structure variable
(a) .(dot)
(b) ,(comma)
(c) : (colon)
(d) ;(semicolon)
Answer:

Option (a)

60.
What is the starting point of C program execution?
(a) #include
(b) void main()
(c) Opening curly braces ‘{‘
(d) None of these
Answer:

Option (b)

Showing 51 to 60 out of 107 Questions