GATE (Graduate Aptitude Test in Engineering) Computer Science: Questions 1589 - 1590 of 2080

Access detailed explanations (illustrated with images and videos) to 2080 questions. Access all new questions- tracking exam pattern and syllabus. View the complete topic-wise distribution of questions. Unlimited Access, Unlimited Time, on Unlimited Devices!

View Sample Explanation or View Features.

Rs. 550.00 -OR-

How to register? Already Subscribed?

Question 1589

Appeared in Year: 2018 (UGC-NET)

Question

MCQ▾

Consider the following two C ++ programs P1 and P2 and two statements S1 and S2 about these programs: (Dec)

  1. P1
  2. P2
  3. voidf(inta, int ⚹b, int &c)
  4. {
  5.     a=1;
  6.     b=2;
  7.     c=3;
  8. }
  9. intmain()
  10. {
  11.     inti=0;
  12.     f(i, &i, i);
  13.     cout ≪ i;
  14. }
  15. doublea=1, b=2;
  16. double &f(double &d)
  17. {
  18.     d=4;
  19.     returnb;
  20. }
  21. intmain()
  22. {
  23.     inti=0;
  24.     f(a)=5;
  25.     cout ≪ a≪“:”≪b;
  26. }

S1: P1 prints out 3

S2: P2 prints out

What can you say about the statements S1 and S2?

Choices

Choice (4)Response

a.

Neither S1 nor S2 is true.

b.

S1 and S2 are true.

c.

Only S2 is true.

d.

Only S1 is true.

Question 1590

Appeared in Year: 2018 (UGC-NET)

Question

MCQ▾

Consider the following statements: (December)

  1. Auto increment addressing mode is useful in creating self-relocating code.
  2. If auto increment addressing mode is included in an instruction set architecture, then an additional ALU is required for effective address calculation.
  3. In auto increment addressing mode, the amount of increment depends on the size of the data item accessed.

Which of the above statements is/are true?

Choices

Choice (4)Response

a.

(1) and (2) only

b.

(2) only

c.

(2) and (3) only

d.

(3) only

Developed by: