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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
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's the best way to declare and define global variables?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What's the best way to declare and define global variables?
Answer
# 1
The best arrangement is to place each definition in some
relevant .c file, with an external declaration in a header file.

 
Is This Answer Correct ?    7 Yes 2 No
Guest
 
  Re: What's the best way to declare and define global variables?
Answer
# 2
as for C is concerned the best way to declare and define the
global variable is brefore the main() function
 
Is This Answer Correct ?    1 Yes 3 No
Vignesh1988i
 
 
 
  Re: What's the best way to declare and define global variables?
Answer
# 3
after declaring the header files declare the global 
variables to be used that is the best way.
 
Is This Answer Correct ?    2 Yes 0 No
Anurag Aggarwal
 
  Re: What's the best way to declare and define global variables?
Answer
# 4
By using #define directive............
 
Is This Answer Correct ?    0 Yes 3 No
S.madhavi
 
  Re: What's the best way to declare and define global variables?
Answer
# 5
the best way to declare and define global variables after 
the header files or before the main function.
 
Is This Answer Correct ?    1 Yes 0 No
Karnik Ankit
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x? Subex2
What is a class?  2
what is the differnce between AF_INET and PF_INET? Wipro2
If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.  4
write an interactive program to generate the divisors of a given integer. TCS4
why should i select you? Wipro18
why r u join this company? give solid resons. Infosys7
DIFFERNCE BETWEEN THE C++ AND C LANGUAGE? Wipro2
what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; } Honeywell2
what is the size of an integer variable?  1
give one ip, find out which contry Google4
write a Program to dispaly upto 100 prime numbers(without using Arrays,Pointer) Wipro7
#define DCHAR char* typedef char* TCHAR; if using these following variables will be declared like DCHAR ch1, ch2; TCHAR ch3, ch4; then what will be types of ch1, ch2, ch3 and ch4? NDS1
Explain in detail how strset (string handling function works )pls explain it with an example.  1
9.how do you write a function that takes a variable number of arguments? What is the prototype of printf () function? 10.How do you access command-line arguments? 11.what does ‘#include<stdio.h>’ mean? 12.what is the difference between #include<> and #include”…”? 13.what are # pragma staments? 14.what is the most appropriate way to write a multi-statement macro? L&T4
we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language????????????? Google2
Write a program in c to input a 5 digit number and print it in words.  1
main is a predefined or user define function if user defined why? if predefined whay? TCS2
What are the phases in s/w developed life cycle? wat is the diff b/w stack & queue...where do we use stack  5
if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')  9
 
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