Professional Documents
Culture Documents
The format identifier ‘%i’ is also used for _____ data type?
• A. char
• B. int
• C. float
• D. double
• Answer: Option B
• Explanation:
• Both %d and %i can be used as a format identifier for int data types
•
Ques.
Is it true that a function may have several declaration, but only one definition.
(A) True
(B) False
Ans. (A)
Hint:
Declaration like int sum(int, int); is allowed number of times but definition int sum(int a, int b) {
return a+b; } is allowed only one time. Multiple definition of same function is compilation error (
redefinition error )
• A. 4 Bytes
• B. 8 Bytes
• D. Cannot be determined.
• Answer: Option C
• Explanation:
• The size of the data types depend on the system.
Which of the following are themselves a collection of different data types?
• A. String
• B. Structure
• C. Char
• Answer: Option B
• Explanation:
• None.
• A. Another structure
• B. Function
• C. Array
Answer: Option B
• A. struct temp{}s;
main(){}
• B. struct temp{};
struct temp s;
main(){}
• C. struct temp s;
struct temp{};
main(){}
Answer: Option D
• A. 3 and 4
• B. 1 and 2
• C. 1 and 3
• D. 1, 3 and 4
Answer: Option B
Option B
Ans. D
Ans. D
Ans. D
Ans. D
Explanation:
Yes. Recursion is slow. Variable are kept and remove on STACK
memory multiple times.
Ans. B
Explanation:
Yes. To come out of recursion, you must use IF or ELSE blocks.