ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
What is the meaning When we write "#include" what is # and
what does include does there???
 Question Submitted By :: Parvez
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 1
# is the one of a symbol used by a developer of C language
standards for defining of macros... if you are designing a
compiler you can use a different symbol or may not use these
symbols for definition of macros............ it dosen't have
meaning and since # is a rare symbol used . so it's my guess .

the include words includes the header or any file with
extension to the C source code that the run time or linker
time..... in which may inbuilt functions are available like
printf,clrscr(),scanf() etc etc............


thank u
 
Is This Answer Correct ?    19 Yes 11 No
Vignesh1988i
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 2
# is a symbol, that represent to the complier,the header
files are includes in the program.....include key word is
using to include the header files in c
 
Is This Answer Correct ?    10 Yes 5 No
The Great Elango
 
 
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 3
# refers to pre-processor directives. Pre-processor word 
means that the header file following #include is already 
processed and their is no chance of it containing any 
errors or flaws.  User can directly include the header file 
in his/her program.
 
Is This Answer Correct ?    22 Yes 5 No
Prof.gagandeep Jagdev
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 4
The symbol '#' is called preprocessor.

All the header files are stored in a folder namely INCLUDE. 
When need to us use them we must mention as follows.
#include<headerfile_name.h>
 
Is This Answer Correct ?    4 Yes 11 No
A.ramachandiran B.sc Cs
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 5
# is the symbol used as the syntax of the header
statement.include is the key word used to link for the
functions in the file(may be in the library or the user
defined) to be used in the program.
 For instance,
               #include<stdio.h>/*used to include the
library file for standard input/output statements-printf()
and scanf()*/
 
Is This Answer Correct ?    2 Yes 4 No
Cynthia
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 6
'#' is a preprocessor directive. The compilers processes
lines in a code starting with a '#' before it compiles the
whole code . Example #define TEN 10 the compiler would
replace all instances of TEN by 10 in the code and only then
compile the code . Similarly ,
 
'#include' - include is a key work which ask the compiler to
also resolve function names and variables names using the
file name specified.
Ex '#include<xyz.h>' indicates the compiler that while
searching resolve function names and/or variable names from
xyz.h file also.
 
Is This Answer Correct ?    3 Yes 3 No
Arjun R
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 7
The # is the Pre-Processor. Means it is a special kind of 
program that executed before the actual compilation of the 
program. When it executed it performs several tasks like 
defining etc. On such operation is the include. The include 
tell that the current program requires certain inclusion of 
files. Like #include<stdio.h>. Here we are directing the 
pre-processor to include the stdio.h header file.
 
Is This Answer Correct ?    1 Yes 3 No
Raghuveer
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 8
# is the main part of the 'c'program.it is used to define 
the header file it means that it is used to declare that
header filesfor ex:"#include<stdio.h>".here it is used for 
standarad for declaring printf and scanf() 
functions.here "#" is the main part. 
"#include<conio.h>"
it is used for clrscr() and getch()functions.here 
also "#"is the main header file.actually it is preprocessor.
 
Is This Answer Correct ?    1 Yes 3 No
Karthikamburu
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 9
For example,# is probably known as the pre-processor,because
its called conditional platform code.And also its a header
part section.
The #include use in 2 ways.One is the #include<filename> and
second is the #include"filename".The First one,if the file
is not  found there the compiler checks the source header
directory.If the file is not still found there,the
pre-processor checks the current directory....

#include"filename":
              If the file is not found there the compiler
checks the compile include directory.If the file is still
not  found there the pre-procesor checks the source header
directory. 

Note:
    The compiler first checks the compile include directory
for the specified file.

   And also thanks for giving the chance for scribble here.
 
Is This Answer Correct ?    0 Yes 3 No
Prasanna
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 10
# work as a preprocessor when include is used for to connect
the header file to the complier, we want to write
#include"stdio.h" or <stdio.h> because c has no built-in
function to run the program.like wise we include "conio.h"
which is used for link the clrscr()and getch(),but it is not
so important because we can run the program without using
clrscr() and getch() from the header file "conio.h" but we
never run the program without using <stdio.h>
 
Is This Answer Correct ?    2 Yes 0 No
Singaravel
 
  Re: What is the meaning When we write "#include" what is # and what does include does there???
Answer
# 11
Header file used for to accepped the total programs and
steps in c language. 

                   #include<stdio.h>

#--> preprocessor (define a programing checking concept)

include-->  it interface both the header file and preprocessor
 
<    >-->   Expretion of header file area

"    "-->   charater type using a section of header file.

stdio.h-->  standard input output.header (header file name)
 
Is This Answer Correct ?    1 Yes 2 No
Sakthivel.m
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What is the output of the program given below #include<stdio.h> main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); } ADITI14
what is calloc and malloc?  1
what is a c-language.what is do. HCL3
what is link list?  2
2. What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value Accenture2
How would you write qsort?  1
what is self refrential structure HCL2
Difference Between embedded software and soft ware? Bosch1
if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND CORRESPONDING VALUE FROM ASCII TABLE  1
compute the nth mumber in the fibonacci sequence? TCS7
what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason  3
Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... } TCS4
how to connect oracle in C/C++.  2
what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1 IBM1
how can i get output like this? 1 2 3 4 5 6 Excel3
#include main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } } ME5
what is the difference between #include<stdio.h> and #include"stdio.h" ? TCS5
int *a[5] refers to TCS8
Every time i run a c-code in editor, getting some runtime error and editor is disposing, even after reinstalling the software what may be the problem?  2
Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; } Qualcomm3
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com