What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. char *ptr; 6. char Str[] = "abcdefg"; 7. ptr = Str; 8. ptr += 5; 9. cout << ptr; 10. return 0; 11. }
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. char arr[20]; 6. int i; 7. for(i = 0; i < 10; i++) 8. *(arr + i) = 65 + i; 9. *(arr + i) = '\0'; 10. cout << arr; 11. return(0); 12. }
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char
and returns a pointer to a pointer to a integer is
What is the output of this program?
1. #include2. using namespace std; 3. int main() 4. { 5. int a = 5, b = 10, c = 15; 6. int *arr[ ] = {&a, &b, &c}; 7. cout << arr[1]; 8. return 0; 9. }
What will happen in this code?
int a = 100, b = 200;
int *p = &a, *q = &b;
p = q;