Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


#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

write a c program to Create a mail account by taking the username, password, confirm password, secret_question, secret_answer and phone number. Allow users to register, login and reset password(based on secret question). Display the user accounts and their details .

2 Answers  


to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD

6 Answers   Synergy,


How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.

2 Answers  


Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).

12 Answers   Intel, Microsoft, TCS,


void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }

2 Answers  






write a c-program to display the time using FOR loop

3 Answers   HCL,


write a c program to print magic square of order n when n>3 and n is odd?

1 Answers   HCL,


main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


Find your day from your DOB?

15 Answers   Accenture, Microsoft,


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error

1 Answers   HCL,


String reverse with time complexity of n/2 with out using temporary variable.

10 Answers   NetApp, Symantec,






Categories