What's the best way to declare and define global variables?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know the difference between malloc() and calloc() function?

610


What is an auto keyword in c?

641


Which of these functions is safer to use : fgets(), gets()? Why?

631


If I have a char * variable pointing to the name of a function ..

650


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

622






Can you please explain the scope of static variables?

597


Explain is it better to bitshift a value than to multiply by 2?

712


What is #include conio h?

593


how we can make 3d venturing graphics on outer interface

4000


Why is python slower than c?

600


What is line in c preprocessor?

611


Differentiate between functions getch() and getche().

618


Where are local variables stored in c?

570


What is the difference between formatted&unformatted i/o functions?

612


List the difference between a While & Do While loops?

631