Q. What is the output of C Program with String Pointer?
Code:
int main()
{
char country[]="BRAZIL";
char *ptr;
ptr=country;
while(*ptr != '\0')
{
printf("%c", *ptr);
ptr++;
}
return 0;
}
β
Correct Answer: (B)
BRAZIL