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 |
Explain what is page thrashing?
What is a protocol in c?
write a program for fibonaci series by using while loop in c?
what is difference between C and C++
main() { int i=0; while(+(+i--)!=0) i-=i++; printf(i); }
Find Index of least significant bit set in an Integer. ex. int value is say 10001000 results should be 4.
code for inverse a matrix
What is union in c?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
Difference between constant pointer and pointer to a constant.
HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.