ALLInterview.com :: Home Page            
 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                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2266)
 C++ interview questions  C++ Interview Questions (1121)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (652)
Question
What is the meaning When we write "#include" what is # and
what does include does there???
 Question Submitted By :: C
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
# 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 ?    98 Yes 14 No
Prof.gagandeep Jagdev
 
Answer
# 2
# 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 ?    85 Yes 40 No
Vignesh1988i
 
 
 
Answer
# 3
# 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 ?    27 Yes 7 No
Singaravel
 
Answer
# 4
# 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 ?    43 Yes 29 No
The Great Elango
 
Answer
# 5
'#' 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 ?    19 Yes 10 No
Arjun R
 
Answer
# 6
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 ?    13 Yes 9 No
Raghuveer
 
Answer
# 7
# is a symbol with the help of which the compiler will
first process the statement following # before compiling
the program. for example if we have something called
#define MAX 100 then the compiler will replace all MAX in
the program with 100 and then compile the program.
Likewise include following # will tell the compiler to
include the header file mentioned in the statement.
ex: #include<stdio.h>


I think all will be satisfied with my answer....!
 
Is This Answer Correct ?    8 Yes 4 No
Kamal
 
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 ?    14 Yes 11 No
Karthikamburu
 
Answer
# 9
# is a symbol used by the developer of c compiler designer
to define the preprocessor 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 flats. User can directly include the header file
in their program.
The #include use in 2 ways.
1. #include<filename> and
2. #include"filename".
in #include<filename>
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....

in #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.
 
Is This Answer Correct ?    2 Yes 1 No
Pooja Gupta
 
Answer
# 10
The #include directive tells the preprocessor to treat the contents of a specified file as if those contents had appeared in the source program at the point where the directive appears.
About '#' and "include"
The '#' sign tells the preprocessor, which scans the code before sending it to the compiler, to do something.

"include" tells the preprocessor that the following file is to be included in the compiling process.
 
Is This Answer Correct ?    1 Yes 0 No
Sanjeev
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
How we can set and clear bit in a byte using macro function? L&T 2
how can i print "hello".please consider inverted commas as well.i want to print on console: "hello" Wipro 4
suppose we use switch statement and we intilize years name using enum statement like(jan,feb,mar,------dec) we take integer value as an input .question is that the month which we analyz is from 0 to 11 bt if i enter 12 than how he again starts from begning and print jan   1
main() { char *ptr = "Ramco Systems"; (*ptr)++; printf("%s\n",ptr); ptr++; printf("%s\n",ptr); } Find the Outputs? CitiGroup 9
Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]   2
Diff between for loop and while loop? Tcs 2
write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR IBM 3
how to find the binary of a number? Infosys 10
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--); RMSI 19
is it possible to change the default calling convention in c ? Aptech 1
please help me.. how to write a code of this output?? "Enter range number:"10 1 is an odd number 2 is an even numbers 3 in an odd numbers 4 " to 10" "printing all odd numbers:" 1,3,5,7,9 "printing all even numbers:" 2,4,6,8,10 "sum of all odd numbers:25 "sum of all even numbers:30 using a C Programming ARRAY pleas pleas help.. its my project ..please :(   1
What is meant by global static? why we have to use static variable instead of Global variable L&T 4
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com