Top

Discussion

Predict the output?

#include  
int fun(char *str1) 
{ 
  char *str2 = str1; 
  while(*++str1); 
  return (str1-str2); 
} 
  
int main() 
{ 
  char *str = "GeeksQuiz"; 
  printf("%d", fun(str)); 
  return 0; 
} 

 

  • A.10
  • B.9
  • C.8
  • D.Random Number

Answer: B

No answer description available for this question.
 

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

Post your comment