What's the best way to declare and define global variables?
Answers were Sorted based on User's Feedback
Answer / guest
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 ? | 17 Yes | 3 No |
Answer / karnik ankit
the best way to declare and define global variables after
the header files or before the main function.
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / anurag aggarwal
after declaring the header files declare the global
variables to be used that is the best way.
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / vignesh1988i
as for C is concerned the best way to declare and define the
global variable is brefore the main() function
Is This Answer Correct ? | 10 Yes | 5 No |
Answer / ajeet singh
through the "public" key world, we define the globle variable.
Is This Answer Correct ? | 1 Yes | 5 No |
Consider a language that does not have arrays but does have stacks as a data type.and PUSH POP..are all defined .Show how a one dimensional array can be implemented by using two stacks.
Write a program in c to input a 5 digit number and print it in words.
What is restrict keyword in c?
Why c language?
How can I split up a string into whitespace-separated fields?
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
how should functions be apportioned among source files?
What is #include stdlib h?
Explain #pragma statements.
find largest element in array w/o using sorting techniques.
What is auto keyword in c?