GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 72 of 258    Print  
In header files whether functions are declared or defined?

  
Total Answers and Comments: 4 Last Update: July 04, 2008   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 01, 2005 06:05:11   #1  
s.annalakshmi        

RE: In header files whether functions are declared or defined?
header files are declared
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
September 21, 2005 04:05:15   #2  
yogeshpanda Member Since: September 2005   Contribution: 50    

RE: In header files whether functions are declared or...
In header files function are declared.
 
Is this answer useful? Yes | No
April 27, 2006 06:46:14   #3  
Yashwant Pinge        

RE: In header files whether functions are declared or defined?
It depends on the user that creats the header files.Mostly headers file contains other file declaration and function declaration.Note that declaration and defination of functions are two different things
 
Is this answer useful? Yes | No
July 04, 2008 02:47:00   #4  
Silvio Member Since: June 2008   Contribution: 2    

RE: In header files whether functions are declared or defined?

It is possible to declare and define body functions in header files there is no restrictions to create your all code inside a header file.


SourceCode.c:
#include "SourceCode.h"


SourceCode.h:
#include <stdio.h>
#include <conio.h>


int Calc(int p_iNum1 int p_iNum2);


int main()
{
printf("Hi there! 1 + 1 d" Calc(1 1));

getch();


return 0;
}


int Calc(int p_iNum1 int p_iNum2)
{
return p_iNum1 + p_iNum2;
}



 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape