[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

20 / 53

What will be output of the following "c" code?

#include<stdio.h>
char *someFun1()
{
char temp[] = "string";
return temp; 
}
char *someFun2()
{
char temp[] = {'s', 't','r','i','n','g'};
return temp;
}
int main()
{ 
puts(someFun1()); 
puts(someFun2());
}

Astring string

BSegmentation fault

CGarbage Value

DCompilation Error

ENone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!