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...


main()

{

show();

}

void show()

{

printf("I'm the greatest");

}

Answers were Sorted based on User's Feedback



main() { show(); } void show() { printf(&quo..

Answer / susie

Answer :

Compier error: Type mismatch in redeclaration of show.

Explanation:

When the compiler sees the function show it doesn't know
anything about it. So the default return type (ie, int) is
assumed. But when compiler sees the actual definition of
show mismatch occurs since it is declared as void. Hence the
error.

The solutions are as follows:

1. declare void show() in main() .

2. define show() before main().

3. declare extern void show() before the use of show().

Is This Answer Correct ?    7 Yes 0 No

main() { show(); } void show() { printf(&quo..

Answer / ravneet kaur

ans: declaration terminated incorrectly.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Code Interview Questions

main() { clrscr(); } clrscr();

2 Answers  


posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come

2 Answers   GATE,


Sorting entire link list using selection sort and insertion sort and calculating their time complexity

1 Answers   Infosys, Microsoft, NetApp,


write a simple calculator c program to perform addition, subtraction, mul and div.

0 Answers   United Healthcare, Virtusa,


main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }

1 Answers  


C program to print magic square of order n where n > 3 and n is odd

2 Answers   Accenture,


struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error

3 Answers   HCL,


How to swap two variables, without using third variable ?

104 Answers   AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,


main() { 41printf("%p",main); }8

1 Answers  


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

6 Answers   Fusion Systems GmbH,


given integer number,write a program that displays the number as follows: First line :all digits second line : all except the first digit . . . . Last line : the last digit

8 Answers  


Write a program to model an exploding firecracker in the xy plane using a particle system

0 Answers   HCL,


Categories