Chap. 1 : Unit 5 : Structure of C Language : Part 2

मॉल मध्ये जातो, मार्केट मध्ये जातो, आपण माणसं काही ना काही खरेदी करून आणतो…विचारही करत नाही त्या वस्तूचा आपल्याला उपयोग आहे की नाही…प्रोग्रॅमिंग मध्ये मात्र असं चालत नाही.enlightened जशी गरज तशीच व्हेअरेबल्स डिक्लेअर करायला लागतात नाहीतर ढिगभर error आणी warnings नक्कीच मिळणार…!smiley

Type declaration Statements

In any C program, we need to declare variables at the beginning of a program i.e. at the beginning of a function. This declaration is called as type declaration statements. As the rule suggests, all variables need to be declared before its use.

As said earlier it instructs the compiler to allocate memory on the basis of data type. Int basic_salary, float percentage, char grade are a few examples of type declaration statements and generally 2, 4 and 1 bytes of memory is reserved respectively for these variables. Obviously I am talking about memory reserved under the DOS environment. If you are using any other compiler then you will have to check number of bytes reserved for various data types.

We declare data type of variables depending upon type of constant we intend to store or presume to be stored… after calculation.

Access this framework with lot more stuff like C language MCQ, viva and interview preparation, Glossary, Solved Programs of C language etc. please register for Discount Coupon


Leave a Reply