Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C code?
#include < stdio.h >
int *m()
{
int *p = 5;
return p;
}
void main()
{
int *k = m();
printf(“%d”, k);
}

What will be the output of the following C code?
#include < stdio.h >
int *m()
{
int *p = 5;
return p;
}
void main()
{
int *k = m();
printf(“%d”, k);
}
a) 5
b) Junk value
c) 0
d) Error

Answer: a

Join The Discussion