#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

How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)

4 Answers   HCL,


Write a C program to add two numbers before the main function is called.

11 Answers   Infotech, TC,


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


How to read a directory in a C program?

4 Answers  


#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 Answers  


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

2 Answers  


what is oop?

3 Answers  


Display the time of the system and display the right time of the other country

1 Answers  


1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?

2 Answers  


#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }

1 Answers  


what is the code of the output of print the 10 fibonacci number series

2 Answers  


What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }

1 Answers  


Categories