C Programming :: String - Discussion
Home > C Programming > String > MCQs Questions Discussion
11 / 26
What is the output of the following 'C' program ?
#include<stdio.h>
int main()
{
char arr[] = "Its very beautiful";
char *ptr = "Hello world";
char *str = "Sieze the day";
ptr = &arr[0];
printf("%s\n", ptr);
ptr = &str[0];
printf("%s\n", ptr);
}
#include<stdio.h>
int main()
{
char arr[] = "Its very beautiful";
char *ptr = "Hello world";
char *str = "Sieze the day";
ptr = &arr[0];
printf("%s\n", ptr);
ptr = &str[0];
printf("%s\n", ptr);
}
ACompilation Error
BIts very beautiful Hello world
CIts very beautiful Sieze the day
DNone of these
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!