What is printed by this C code: void inc(int x) { x++; } int a = 5; inc(a); printf(“%d”, a);?
Correct answer C. 5
Subject / 929 questions
Page 4 of Programming multiple-choice questions with answers. Tap an option to check yourself.
Page 4 of 47
Correct answer C. 5
Correct answer A. 5 15
Correct answer A. 6
Correct answer B. 0
Correct answer D. A negative integer
Correct answer A. dest must hold a null-terminated string and have room for both strings plus one null byte
Correct answer D. dst is not null-terminated
Correct answer A. 5
Correct answer B. 32
Correct answer B. std::nullptr_t
Correct answer A. It returns a reference to a local variable that is destroyed when the function returns
Correct answer B. AB
Correct answer B. delete[] p;
Correct answer A. A reference to *this, of type X&
Correct answer A. 1
Correct answer A. 111 103
Correct answer A. Only members declared mutable
Correct answer C. A resource is tied to an object's lifetime, acquired in its constructor and released in its destructor
Correct answer D. 8
Correct answer B. long long