what are the constants?Explain in brief?
Question: what are the constants?Explain in brief?
Question:what are the constants?Explain in brief?
AnswerWhen we declare any variable as constant than we can't be modify the value of that variable at run time.Constants can come in any data type that the C compiler supports. A special constant, the string, can be used to either initialize a character array or be substituted for one.
Some constant in C:
123: int,In the smallest size and type that will hold the value specified.
123U: unsigned int,in the smallest size and type that will hold the value specified.
123L: long int,signed
123UL: long int,unsigned
'A': Character constant
"ABCD": Character string constant
7.89:double-floating-print constant
7.89F:float-floating-print constant
7.89F:long double-floating-point constant
By:Vivek Kr. Agarwal
Date:
what are the constants?Explain in brief?
Post Your Answers
Related Links
- How to differentiate b/n definition and declaration?
- How to define their types of variables and initialize them?
- What is type casting?Explain it with an example?
- What are the Array?How to define and declare them?
- What are the Array Indexing?explain.
- What do you understand about String?Explain it.
- What are the reserved Keywords?Explain it.
- What are the ANSI reserved names in C?
- What are the pointers?How to declare them?
- What are the Indirection?Explain with an example?
- What are the Function Pointer?Explain with an example?
- What are the Bit Operators?
- What are the External Variables?
- How to define structure in C?
- How do u understand about structures of arrays?
- How do you define offsetof() Macro?
- What the use of malloc() function?
- What are the different types of malloc() function in C?
- What is the use of calloc() function?
- What are the different type of calloc() function?
- How to use free() function?
- How to differentiate local memory and global memory?
- What is the significance of disk files?
- What are the Text Files and Binary Files?
- What are the temporary disk files?How to create them?
- What are the stream files?
- What are the stdin and stdout file?
- What is the stdaux file?
- What do you understand about Direct port I/O?
- What is the data management?Also define Sorting, merging and purging, Indexed files?
- What are the Linked List?
- What is the Double LinkedList?
- What is the difference b/n Linear search and Binary search?
- What do you understand about B-Tree?
- What is Thrashing?
- What is a pragma?
- What is the difference between the Heap and the Stack?
- Why n++ executes faster than n+1?
- What is the difference b/n a linker and linkage?
- What is the difference b/n run time binding and compile time binding?
- Write algorithm to reverse a singly linked list.
- WHAT IS LIMITATIONS IN C?
- How to use functions in arrarys? it gives a linker error that function is not defined!!
- Write a program to find the squares of n number using do-while.
- sum of all number in between range use recursive function.
- what happen if we declare a constructor after destructor?
- Write a progarm to count number of vowels,consonant,digit spaces and other character type.
- what is hashing?
- What is diference between malloc() and calloc()?
- Write c program to print all even numbers from 56 to 76 including 56 and 76 using loop.
Question:what are the constants?Explain in brief?