What determines whether something is an invalid constant?
Query Karo Latest Questions
If value of an angle is input through the keyboard, write a program to print all its trigonometric ratios.
If value of an angle is input through the keyboard, write a program to print all its trigonometric ratios.
Read lessPoll Results
Participate in Poll, Choose Your Answer.
Poll Results
Participate in Poll, Choose Your Answer.
Paper of size A0 has dimensions 1189mm*841mm.Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides. Thus paper of size A1 would have dimensions 841mm*594mm.Write a program to calculate and print paper sizes A0, ...Read more
Paper of size A0 has dimensions 1189mm*841mm.Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides. Thus paper of size A1 would have dimensions 841mm*594mm.Write a program to calculate and print paper sizes A0, A1, A2,… A8.
Read lessPoll Results
Participate in Poll, Choose Your Answer.
Two numbers are input through the keyboard into two locations C and D.Write a program to interchange the contents of C and D.
Two numbers are input through the keyboard into two locations C and D.Write a program to interchange the contents of C and D.
Read lessPoll Results
Participate in Poll, Choose Your Answer.
If a five digit number is input through the keyboard, write a program to reverse the number.
If a five digit number is input through the keyboard, write a program to reverse the number.
Read lessConsider a currency system in which there are notes of seven denominations, namely,Re.1,Rs.2,Rs.5,Rs.10,Rs.50,Rs.100.If a sum of Rs. N is entered through the keyboard, write a program to compute the smallest number of notes that will combine to give Rs. N
Consider a currency system in which there are notes of seven denominations, namely,Re.1,Rs.2,Rs.5,Rs.10,Rs.50,Rs.100.If a sum of Rs. N is entered through the keyboard, write a program to compute the smallest number of notes that will combine to give Rs. N
Read less
While defining a constant there are some rules that must be followed. for example: To define integer constant rules are: -It must have at least one digit. -There must be no decimal point. -It does not allow any blanks or commas. -An integer constant can be both negative and positive. -We assume an iRead more
While defining a constant there are some rules that must be followed.
for example: To define integer constant rules are:
-It must have at least one digit.
-There must be no decimal point.
-It does not allow any blanks or commas.
-An integer constant can be both negative and positive.
-We assume an integer constant to be positive if there is no sign in front of that constant.
-The allowable range for this type of constant is from -32768 to 32767.
similarly, rules exist for the string constant, real constant, character constant, floating-point constant, etc.
Ex:
‘ab’ is an invalid character constant (since char must have only one literal)
25,234 is an invalid integer constant (since is not an integer)
25 is an invalid floating-point constant (since it doesn’t contain . a period), etc.
See less