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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1710


What are the uses of a pointer?

675


Why is sizeof () an operator and not a function?

577


What is a null pointer in c?

591


what are the advantages of a macro over a function?

641






what is a function method?give example?

1910


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

590


What does return 1 means in c?

581


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5462


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

1569


What is the difference between declaring a variable by constant keyword and #define ing that variable?

2696


Explain how do you sort filenames in a directory?

600


what is recursion in C

607


What is the use of ?

619


What is the use of getchar() function?

624