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
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 |
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 |
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 |
Which node is more powerful and can handle local information processing or graphics processing?
What is the most efficient way to count the number of bits which are set in a value?
In c programming language, how many parameters can be passed to a function ?
What is the scope of static variables?
what will be the output of "printf("%d%d",scanf("%d% d",&a,&b))".provide an explation regarding the question
HOW TO HANDLE EXCEPTIONS IN C
What are the types of bitwise operator?
Without Computer networks, Computers will be half the use. Comment.
What is volatile variable in c?
Write a program to check armstrong number in c?
What is infinite loop?
wap in c to accept n number display the highest and lowest value