Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Is it fine to write void main () or main () in c?

0 Answers  


What is the difference between big endian form and little endian form? write a code to convert big endian form to little endian and vice versa..

5 Answers   Aricent, TCS,


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

0 Answers  


Why shouldn’t I start variable names with underscores?

0 Answers  


Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We.....Are....Student “ Note: one .=1 Space Output: "We Are Student"

6 Answers   IBM,


write a c program to find the probability of random numbers between 1-1000

0 Answers   ADS,


Write the test cases for checking a variable having value in range -10.0 to +10.0?

0 Answers   Bosch,


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

6 Answers  


write a function for strtok()??

2 Answers   Verifone,


write a code for large nos multilication (upto 200 digits)

2 Answers   Persistent,


What is bin sh c?

0 Answers  


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

8 Answers   Aspire,


Categories