what is the output of the following program and explain the
answer
#include<stdio.h>
exp()
{
main(5)
}
main(int a)
{
printf("%d",a);
return;
}

Answers were Sorted based on User's Feedback



what is the output of the following program and explain the answer #include<stdio.h> exp() ..

Answer / yogesh bansal

if we add semicolon after main(5) like ; main(5);

the ouput will be 1.

Is This Answer Correct ?    2 Yes 2 No

what is the output of the following program and explain the answer #include<stdio.h> exp() ..

Answer / narendra vemuri

: error C2065: 'main' : undeclared identifier
: error C2143: syntax error : missing ';' before '}'
: warning C4508: 'exp' : function should return a value;
'void' return type assumed
: error C2373: 'main' : redefinition; different type modifiers
: warning C4508: 'main' : function should return a value;
'void' return type assumed
Error executing cl.exe.

test.exe - 3 error(s), 2 warning(s)

Is This Answer Correct ?    0 Yes 0 No

what is the output of the following program and explain the answer #include<stdio.h> exp() ..

Answer / vignesh1988i

first of all this will give an error tat 'exp()' is not declared or it needs a prototype & if the 'exp()' is corrected and ';' is added in calling function of main(5) this will print as 5

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More C Interview Questions

Which node is more powerful and can handle local information processing or graphics processing?

0 Answers  


What is the most efficient way to count the number of bits which are set in a value?

4 Answers  


In c programming language, how many parameters can be passed to a function ?

0 Answers  


What is the scope of static variables?

1 Answers  


what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question

6 Answers  






HOW TO HANDLE EXCEPTIONS IN C

8 Answers  


What are the types of bitwise operator?

0 Answers  


Without Computer networks, Computers will be half the use. Comment.

0 Answers  


What is volatile variable in c?

0 Answers  


Write a program to check armstrong number in c?

0 Answers  


What is infinite loop?

0 Answers  


wap in c to accept n number display the highest and lowest value

2 Answers  


Categories