Sail E0 Webinar

MCQs

Total Questions : 22 | Page 2 of 3 pages
Question 11. If integer needs two bytes of storage, then maximum value of an unsigned integer is
  1.    216 – 1
  2.    215 – 1
  3.    216
  4.    215
  5.    None of these
 Discuss Question
Answer: Option A. -> 216 – 1
Question 12. What is the correct value to return to the operating system upon the successful completion of a program?
  1.    1
  2.    -1
  3.    0
  4.    Program do no return a value.
  5.    2
 Discuss Question
Answer: Option C. -> 0
Question 13. Which is the only function all C programs must contain?
  1.    start()
  2.    system()
  3.    main()
  4.    printf()
  5.    getch()
 Discuss Question
Answer: Option C. -> main()
Question 14. What number would be shown on the screen after the following statements of C are executed?
char ch;
int i;
ch = 'G';
i = ch-'A';
printf("%d", i);
  1.    5
  2.    6
  3.    7
  4.    8
  5.    9
 Discuss Question
Answer: Option B. -> 6
Question 15. Which of the following is not a correct variable type?
  1.    float
  2.    real
  3.    int
  4.    double
  5.    char
 Discuss Question
Answer: Option B. -> real
Question 16. Which of following is not a valid name for a C variable?
  1.    Examveda
  2.    Exam_veda
  3.    Exam veda
  4.    Both A and B
  5.    None of these
 Discuss Question
Answer: Option C. -> Exam veda
Question 17. Find the output of the following program. void main() { int i=01289; printf("%d", i); }
  1.    0289
  2.    1289
  3.    713
  4.    0713
  5.    Syntax error
 Discuss Question
Answer: Option E. -> Syntax error
Question 18. Find the output of the following program.
void main()
{
int i=065, j=65;
printf("%d %d", i, j);
}
  1.    53 65
  2.    65 65
  3.    065 65
  4.    053 65
  5.    Syntax error
 Discuss Question
Answer: Option A. -> 53 65
Question 19. What is the difference between a declaration and a definition of a variable?
  1.    Both can occur multiple times, but a declaration must occur first.
  2.    A definition occurs once, but a declaration may occur many times.
  3.    Both can occur multiple times, but a definition must occur first.
  4.    A declaration occurs once, but a definition may occur many times.
  5.    There is no difference between them.
 Discuss Question
Answer: Option D. -> A declaration occurs once, but a definition may occur many times.
Question 20. If ASCII value of 'x' is 120, then what is the value of the H, if
H = ('x' – 'w' ) / 3;
  1.    1
  2.    2
  3.    3
  4.    4
  5.    0
 Discuss Question
Answer: Option E. -> 0

Latest Videos

Latest Test Papers