write a program to display the use of a constant.
Please give right answer
I will follow you and Mark you as brainliest
Answers
Answered by
1
Explanation:
- #include <stdio.h>
- void main()
- {
- const int height = 100; /*int constant*/
- const float number = 3.14; /*Real constant*/
- const char letter = 'A'; /*char constant*/
- const char letter_sequence[10] = "ABC"; /*string constant*/
- const char backslash_char = '\?'; /*special char cnst*/
- printf("value of height :%d \n", height );
- printf("value of number : %f \n", number );
- printf("value of letter : %c \n", letter );
- printf("value of letter_sequence : %s \n", letter_sequence);
- printf("value of backslash_char : %c \n", backslash_char);
- }
Output:
value of height : 100
value of number : 3.140000
value of letter : A
value of letter_sequence : ABC
value of backslash_char : ?
Hope this Helps
Similar questions