IndiaBIX.com
Arithmetic Aptitude Data Interpretation
Logical Reasoning Verbal Reasoning Non Verbal Reasoning
General Knowledge
Sudoku Number puzzles Missing letters puzzles Logical puzzles Playing cards puzzles Clock puzzles
C Programming C# Programming Java Programming
Networking Database Questions Computer Science Basic Electronics Digital Electronics Electronic Devices Circuit Simulation Electrical Enigneering Engineering Mechanics Technical Drawing
Placement Papers Group Disucssion HR Interview Technical Interview Body Language
Aptitude Test Verbal Ability Test Verbal Reasoning Test Logical Reasoning Test C Programming Test Java Programming Test Data Interpretation Test General Knowledge Test
Data Structures Operating Systems Networking DATABASE Database Basics SQL Server Basics SQL Server Advanced SQL Server 2008 JAVA Core Java Java Basics Advanced Java UNIX Unix File Management Unix Memory Management Unix Process Managemnt C Interview Questions The C Language Basics .NET Interview Questions .NET Framework ADO.NET ASP.NET Software Testing

C Programming - C Preprocessor - Discussion

@ : Home > C Programming > C Preprocessor > General Questions - Discussion

2. 

In which stage the following code
#include<stdio.h>
gets replaced by the contents of the file stdio.h

[A]. During editing[B]. During linking
[C]. During execution[D]. During preprocessing

Answer: Option A

Explanation:

The preprocessor replaces the line #include <stdio.h> with the system header file of that name. More precisely, the entire text of the file 'stdio.h' replaces the #include directive.


Sandhya said: (Mon, Nov 29, 2010 06:23:35 AM)    
 
#include is a preprocessor directive(file inclusion)and it includes a file in the program . and as we know that a preprocessor processes our program before execution so the line #include<stdio.h> is replaced by the entire content of the file 'stdio.h' during preprocessing.

Shashank Nalwaya said: (Mon, Aug 22, 2011 10:21:09 AM)    
 
Here the functioning is similar to macros. What actually happens is that before compilation i.e. preprocessing as in macros the macro template is replaced by the macro expansion and than the compilation takes place similarly in this case during preprocessing the content of the file is replaced by the file name and than the compilation takes place.

Shankra said: (Fri, Jan 20, 2012 03:17:45 PM)    
 
Thanks sanhya.

Write your comments here:
Name *:     Email:


© 2008-2011 by IndiaBIX™ Technologies. All Rights Reserved | Copyright | Terms of Use & Privacy Policy

Advertise     Contact us: info@indiabix.com     Follow us on twitter!