Top

Discussion

#include  
int main() 
{ 
    char *str1 = "GeeksQuiz"; 
    char str2[] = "GeeksQuiz"; 
  
    printf("sizeof(str1) = %d, sizeof(str2) = %d", 
           sizeof(str1), sizeof(str2)); 
  
    return 0; 
} 

 

  • A.sizeof(str1) = 10, sizeof(str2) = 10
  • B.sizeof(str1) = 4, sizeof(str2) = 10
  • C.sizeof(str1) = 4, sizeof(str2) = 4
  • D.sizeof(str1) = 10, sizeof(str2) = 4

Answer: B

No answer description available for this question.
 

No comment is present. Be the first to comment.
Loading…

Post your comment