1. Determine Output:
void main()
{
char far *farther, *farthest;
printf("%d..%d", sizeof(farther), sizeof(farthest));
}
void main()
{
char far *farther, *farthest;
printf("%d..%d", sizeof(farther), sizeof(farthest));
}
2. Determine Output:
main()
{
char *str1 = "abcd";
char str2[] = "abcd";
printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));
}
main()
{
char *str1 = "abcd";
char str2[] = "abcd";
printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));
}
3. Choose the best answer.
Prior to using a pointer variable
Prior to using a pointer variable
4. Comment on the following pointer declaration?
int *ptr, p;
int *ptr, p;
5. What will be the output?
main()
{
char *p;
p = "Hello";
printf("%cn",*&*p);
}
main()
{
char *p;
p = "Hello";
printf("%cn",*&*p);
}