Which one of the following is not a possible state for a pointer.
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What will happen in the following C++ code snippet?
int a = 100, b = 200;
int *p = &a, *q = &b;
p = q;
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 will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
char *ptr;
char Str[] = "abcdefg";
ptr = Str;
ptr += 5;
cout << ptr;
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a = 5, b = 10, c = 15;
int *arr[ ] = {&a, &b, &c};
cout << arr[1];
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
char arr[20];
int i;
for(i = 0; i < 10; i++)
*(arr + i) = 65 + i;
*(arr + i) = '\0';
cout << arr;
return(0);
}