Strings

Q1: If the size of pointer is 32 bits What will be the output of the program ?
#include<stdio.h>

int main()
{
    char a[] = "Visual C++";
    char *b = "Visual C++";
    printf("%d, %d\n", sizeof(a), sizeof(b));
    printf("%d, %d", sizeof(*a), sizeof(*b));
    return 0;
}

A 10, 2
2, 2

B 10, 4
1, 2

C 11, 4
1, 1

D 12, 2
2, 2

ANS:C - 11, 4
1, 1

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.