if we take a number as a char then can we manipulate(add,
subtract) on this number

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 4 data types?

592


How can I open files mentioned on the command line, and parse option flags?

584


List the different types of c tokens?

619


How can I read and write comma-delimited text?

616


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

569






What is the difference between char array and char pointer?

523


which is an algorithm for sorting in a growing Lexicographic order

1392


What would be an example of a structure analogous to structure c?

570


Why should I use standard library functions instead of writing my own?

665


what are the advantages of a macro over a function?

637


Write a code on reverse string and its complexity.

599


What are the benefits of organizational structure?

566


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

660


program to convert a integer to string in c language'

1980


Explain the use of 'auto' keyword

669