C Programming :: Functions - Discussion
Home > C Programming > Functions > MCQs Questions Discussion
21 / 53
What is the output of the following 'C' program ?
#include<stdio.h>
#define MAX 80
void fun(char *to, char *from)
{
while(*from)
*to++ = *from++;
*to = '\0';
}
int main(void)
{
char str[MAX];
fun(str, "this is a test");
printf("%s",str);
}
#include<stdio.h>
#define MAX 80
void fun(char *to, char *from)
{
while(*from)
*to++ = *from++;
*to = '\0';
}
int main(void)
{
char str[MAX];
fun(str, "this is a test");
printf("%s",str);
}
Athis is a test
BCompilation Error
CSegmentation fault
DNone of these
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!