⟩ What is The syntax for a for loop?
for ( variable initialization; condition; variable update ) {
Code to execute while the condition is true
}
for ( variable initialization; condition; variable update ) {
Code to execute while the condition is true
}
Explain different access specifiers for the class member in C++?
Do you know what is the default access level?
What is Protected Inheritance?
Default return type of functions in CPP is a. void b. long c. char d. int
Do you know private, protected and public access control?
By default, if a function with minimum lines of code is declared and defined inside the class becomes Inline function. a. True b. False
Inline functions may not work ______. 1. If function contain static variables 2. If function contain global and register variables 3. If function returning value consists looping construct(i.e. for, while) 4. If inline functions are recursive 5. If function contains const value a. Only 1,4,5 b. Only 2,3,5 c. Only 1,3,4 d. All of these
Default values for a function are specified when____ a. function is defined b. function is declared c. Both a and b d. None of these
Assigning one or more function body to the same name is called_______________ a. Function Overriding b. Function Overloading c. Both a and b d. None
If an argument to a function is declared as const, then a. function can modify the argument b. Function can't modify the argument c. const argument to a function is not possible d. None of these