Programming and Data Structures-Programming in C (GATE Computer Science): Questions 99 - 106 of 134

Get 1 year subscription: Access detailed explanations (illustrated with images and videos) to 913 questions. Access all new questions we will add tracking exam-pattern and syllabus changes. View Sample Explanation or View Features.

Rs. 450.00 or

Question number: 99

» Programming and Data Structures » Programming in C

MCQ▾

Question

The binary equivalent of the Gray code 11100 is…. . ?

Choices

Choice (4) Response

a.

01011

b.

10101

c.

00111

d.

10111

Question number: 100

» Programming and Data Structures » Programming in C

MCQ▾

Question

  1. main() {
  2.     her * p;
  3.     p = "%dn";
  4.     P++;
  5.     P++;
  6.     print(p - 2300);
  7. }

Choices

Choice (4) Response

a.

200

b.

300

c.

100

d.

None of the above

Question number: 101

» Programming and Data Structures » Programming in C

MCQ▾

Question

Who invented the high level language C?

Choices

Choice (4) Response

a.

Niklaus Writh

b.

Donald Kunth

c.

Seymour Papert

d.

Dennis M. Ritchie

Question number: 102

» Programming and Data Structures » Programming in C

MCQ▾

Question

  1. void main() {
  2.     into
  3.     const * p = 5;
  4.     print(“ % d”, ++( * p));
  5. }

Choices

Choice (4) Response

a.

6

b.

5

c.

compile error

d.

Question does not provide sufficient data or is vague

Question number: 103

» Programming and Data Structures » Programming in C

MCQ▾

Question

  1. main() {
  2.     static into vary = 5;
  3.     print(“ % d”, vary–);
  4.     if (varymain();
  5. }

Choices

Choice (4) Response

a.

45321

b.

12345

c.

54321

d.

All of the above

Question number: 104

» Programming and Data Structures » Programming in C

MCQ▾

Question

  1. main() {
  2.     unsigned char i = 0;
  3.     for (; i >= 0i++);
  4.     printf(“ % d n”, i);
  5. }

Choices

Choice (4) Response

a.

compiler error

b.

55555

c.

infinite loop

d.

None of the above

Question number: 105

» Programming and Data Structures » Programming in C

MCQ▾

Question

What will be output if you will compile and execute the following c code?

  1. #define message "union is power of cvoid main()
  2. {
  3.     clrscr();
  4.     printf("%s",message);
  5.     getch();
  6. }

Choices

Choice (4) Response

a.

union is power of c

b.

power of c

c.

Compiler error

d.

Question does not provide sufficient data or is vague

Question number: 106

» Programming and Data Structures » Programming in C

MCQ▾

Question

If the number of leaves in a strictly binary tree is an odd number, then what can you say with full conviction about total number of nodes in a tree?

Choices

Choice (4) Response

a.

It is an even number

b.

It cannot be equal to the number of leaves.

c.

It is always greater than twice the number of leaves.

d.

It is an odd number

Sign In