0
606views
What will be the output of the following program code?

Program:

 void main ( ) { 
    char a[]= "Hello World" ; 
    char *p ; 
    p=a; 
    printf("\n%d %d %d %d", sizeof(a), sizeof(p), strlen(a), strlen(p) );
    }

A] 11 11 10 10

B] 10 10 10 10 10

C] 12 12 11 11

D] 12 2 11 11

1 Answer
2
11views

Option C] 12 12 11 11

Size of a=12

Size of p=12 ---- it would change as it is the length of address value

String length of a=11

String length of p=11

Please log in to add an answer.