Study the code:
void show()
main()
{
show();
}
void show (char *s)
{
printf("%sn",s);
}
What will happen if it is compiled & run on an ANSI C
Compiler?
A)It will compile & nothing will be printed when it is
executed
B)it will compile but not link
C)the compiler will generate an error
D)the compiler will generate a warning

Answers were Sorted based on User's Feedback



Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

Answer / manjeet

The compiler will generate an error because the is no ";"
semicolon after the prototype declaration of show function

Is This Answer Correct ?    2 Yes 0 No

Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

Answer / manjeet

Then answer wll be (B) will compile but not link

Is This Answer Correct ?    1 Yes 1 No

Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

Answer / subbu[iit kgp]

if it is assumed that there is a semicolon after the
function prototype declaration of show(), then answer is A.

Is This Answer Correct ?    1 Yes 2 No

Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",..

Answer / vignesh1988i

according to my compailer it will have an error "function
called incorrectly"

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

Are there any problems with performing mathematical operations on different variable types?

0 Answers  


What tq means in chat?

0 Answers  


Explain what is the difference between null and nul?

0 Answers  


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

0 Answers   Aegis, CDAC, Infosys,


You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.

2 Answers   Qualcomm,






What is the difference b/w Structure & Union?

3 Answers  


#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }

2 Answers  


Explain the use of fflush() function?

0 Answers  


Write a code to determine the total number of stops an elevator would take to serve N number of people.

0 Answers   Expedia,


biggest of two no's with out using if condition statement

8 Answers  


I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.

1 Answers  


WHOT IS CHAR?

4 Answers   TCS,


Categories