Interview Questions and Answer on Functions in C++ : (10)
Question: 1
Question: 2
(A) Yes
(B) No
(C) Compilation Error
(D) Runtime Error
Compiler
Level: Beginner Category: function
[Posted by: | ]
Question: 3
(A) Yes
(B) No
(C) Compilation Error
(D) Runtime Error
Compiler
Level: Beginner Category: function
[Posted by: | ]
Question: 4
(A) Yes
(B) No
Compiler
Level: Beginner Category: function
[Posted by: | ]
Question: 5
(A) It is not possible
(B) It is possible only with C code
(C) By using extern "C" keyword
(D) By Converting C++ code to C
Compiler
Level: Practitioner Category: function
[Posted by: | ]
Question: 6
(A) Yes
(B) No
Compiler
Level: Expert Category: function
[Posted by: | ]
Question: 7
(A) char *intStr = itoa(a); string str = string(intStr);
(B) std::string s = std::to_string(42);
(C) char stringNum[20]; int num=100; sprintf(stringNum,"%d",num);
(D) None of the above
Compiler
Level: Expert Category: function
[Posted by: | ]
Question: 8
(A) Arguments are placed in registers
(B) Arguments are placed in stack
(C) Arguments are placed in Heap
(D) None of the above
Compiler
Level: Expert Category: function
[Posted by: | ]
Question: 9
(A) cdecl
(B) syscall
(C) pascal
(D) register
Compiler
Level: Expert Category: function
[Posted by: | ]
Question: 10
(A) Static function
(B) constructor
(C) destructor
(D) friend
Compiler
Level: Practitioner Category: function
[Posted by: | ]
C++ Online Test
Compile C++ code here
Browse C++ Categories
Loops Conditional Functions Operators Structure Enum Data Types Inheritance Pointers Classes & Objects Vtable Type Casting New & Delete Namespaces Virtual Functions Abstract Class STL Singleton Class Exceptions C++11 C++17 C++20 Time & Space Complexity othersSwitch to C Questions