Explain the symbolic constants in c language, C/C++ Programming

Assignment Help:

Explain the Symbolic Constants in c language?

Symbolic constants are the constants of any type that declared by using the #define compiler directive and it is a preprocessor directive. The Preprocessor' is a translation phase that is applied to your source code before the compiler proper gets its hands on it. Usually the preprocessor performs textual substitutions on your source code. Macro is a kind of preprocessor which replaces instances of one piece of text with another.

The preprocessor line shown below defines symbolic constant

#define name text

Defines the macro with the given name having as its value the given replacement text. Subsequent to that (for the rest of the current source file) wherever the preprocessor sees that name it will replace it with the replacement text.

Its general syntax is as shown below

#define ANGLE_MIN 0
#define ANGLE_MAX 360

It would define ANGLE_MIN and ANGLE_MAX to the values 0 and 360 respectively and C distinguishes between uppercase and lowercase letters in variable names and it is customary to use capital letters in defining symbolic constants.


Related Discussions:- Explain the symbolic constants in c language

Program to list the cities and their states, The program will ask the user ...

The program will ask the user to enter: '1' to List the cities(and their state abbrev)  from largest to smallest (by their population) with their population '2'  to List the

Binary search in array: - c program, Binary search in array: - C program: ...

Binary search in array: - C program: Write a program in c to define binary search in array. void main()                 {                 clrscr();

C program to search for a given character in a string, Program is to search...

Program is to search for a given character in a string: Program is to search for a given character in a string and print point of match char *stsearch(char *string, char sea

Can i employ realloc() on pointers allocated through new?, A: No.       ...

A: No.       While realloc() need to copy the allocation, this uses a bitwise copy operation, that will tear several C++ objects to shreds. C++ objects must be allowed to copy t

Explain operator overloading fundamentals, Operator Overloading Fundamental...

Operator Overloading Fundamentals The C language uses the concept of Operator Overloading discreetly. The asterisk (*) is used as multiplication operator as well as indirect

Draw a circle in c program , Draw a circle in c program: void main() ...

Draw a circle in c program: void main() { clrscr(); int i,r=50,t,j,x,y; int gd,gm; gd =DETECT; initgraph(&gd,&gm,""); for(x=50;x for(y=50;y {   i

Logic, to calculate the amount to be paid by a customer buying yummy cupcak...

to calculate the amount to be paid by a customer buying yummy cupcakes for his birth day party

Flowchart.., flowchart of c programing to check the given number is prime o...

flowchart of c programing to check the given number is prime or not

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd