if we take a number as a char then can we manipulate(add,
subtract) on this number
Answer Posted / 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 |
Post New Answer View All Answers
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is union in c?
Write a program to print factorial of given number without using recursion?
What is equivalent to ++i+++j?
What are lookup tables in c?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
Compare and contrast compilers from interpreters.
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
When a c file is executed there are many files that are automatically opened what are they files?
How to set file pointer to beginning c?
What is pivot in c?
What is the difference between printf and scanf )?
What are all different types of pointers in c?
In a byte, what is the maximum decimal number that you can accommodate?