Identify the type of the variables.
typedef char* CHAR;
CHAR p,q;
Identify the incorrect statements.
int var = 10;
int *ptr = &(var + 1); //statement 1
int *ptr2 = &var; //statement 2
&var = 40; //statement 3
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. int a = 10; 6. if (a < 10) { 7. for (i = 0; i < 10; i++) 8. cout << i; 9. } 10. else { 11. cout << i; 12. } 13. return 0; 14. }
What is the output of this program?
1. #include2. using namespace std; 3. void addprint() 4. { 5. static int s = 1; 6. s++; 7. cout << s; 8. } 9. int main() 10. { 11. addprint(); 12. addprint(); 13. addprint(); 14. return 0; 15. }
Can two functions declare variables(non static) with the same name.