[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

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);
}

Athis is a test

BCompilation Error

CSegmentation fault

DNone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!