#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

C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,


#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }

3 Answers  


main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024

2 Answers   HCL,


Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.

1 Answers   Samar State University,


main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }

1 Answers  






write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?

1 Answers  


what is oop?

3 Answers  


{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }

4 Answers  


code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123

1 Answers   HCL,


print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!

11 Answers   Wipro,


¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...

3 Answers  


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

0 Answers  


Categories