#include"math.h"
void main()
{
printf("Hi everybody");
}
if <stdio.h> will be included then this program will must
compile, but as we know that when we include a header file
in "" then any system defined function find its defination
from all the directrives. So is this code of segment will
compile? If no then why?

Answers were Sorted based on User's Feedback



#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h>..

Answer / er. preeti

There is no error in this code. If you will compile this
code in Borland Turbo C++ compiler, then the program will
be compiled easily and no error will be shown at that
time. In addition, if you want the output then include
getch(); after the printf statment. You will get the
output definetly.

#include "math.h"
void main()
{
printf("Hi Everybody");
getch();
}

Is This Answer Correct ?    3 Yes 0 No

#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h>..

Answer / siva.kumar

above error will come
error C3861: 'printf': identifier not found

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Code Interview Questions

main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

4 Answers   HCL,


What is data _null_? ,Explain with code when u need to use it in data step programming ?

0 Answers   Abbott,


#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }

1 Answers  


main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }

2 Answers  


Cau u say the output....?

1 Answers  






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

1 Answers   Infosys, Microsoft, NetApp,


how to return a multiple value from a function?

5 Answers   Wipro,


main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }

1 Answers  


abcdedcba abc cba ab ba a a

2 Answers  


plz send me all data structure related programs

2 Answers  


#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above

3 Answers   HCL,


Is this code legal? int *ptr; ptr = (int *) 0x400;

1 Answers  


Categories