if we take a number as a char then can we manipulate(add,
subtract) on this number
Answers were Sorted based on User's Feedback
Answer / aravind
yes.For example
#include<stdio.h>
int main()
{
int x,y;
x='A'+1;
y='B'-1;
printf("%d,%d\n",x,y);
}
It will add the Asci value of A and subtracts B, Than 62 or B will be ans for x and A or 61 will be ans for y.
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / deepak garg
#include<stdio.h>
int main()
{
int x,y;
x=1+'a';
y='b'-1;
printf("%d,%d\n",x,y);
}
| Is This Answer Correct ? | 1 Yes | 0 No |
5. distance conversion: Convert a distance from miles to kilometers .there are 5280 feets per mile,12 inches per foot .2.54 centimeters per inch and 100000centimeters per kilometer
A program to write a number of letters and numbers, such as counting and display
what is Array?
What is the use of keyword VOLATILE in C?
Stimulate calculator using Switch-case-default statement for two numbers
What are function pointers? Provide an example.
How does normalization of huge pointer works?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
How do you define CONSTANT in C?
Write a program in C for showing working of different logical operator in C. Your program should guide users with proper message/menu on the console.
Why is c called a structured programming language?
What is variable in c example?