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 |
WHAT IS INT?
how to write palindrome program?
Input any no. and print all the the numbers that comes before it like this for e.g input = 4 0 01 012 0123 01234 plz answer it 2day
main() { int a=0; if(a=0) printf("Ramco Systems\n"); printf("India\n"); } output?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
What are structure types in C?
main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); }
What's a good way to check for "close enough" floating-point equality?
how to find anagram without using string functions using only loops in c programming
State two uses of pointers in C?
what are the stages of compilation
What is variable and explain rules to declare variable in c?