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 does static variable mean in c?
main() { int x=5,y=10,z=0; x=x++ + y++; y=y++ + ++x; z=x++ + ++y; printf("%d%d%d\n",x,y,z); }
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
How do you use a pointer to a function?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
write the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.
Explain the use of bit fieild.
#include<stdio.h> int f(int,int); int main() { printf("%d",f(20,1)); return 0; } int f(int n,int k) { if(n==0) return 0; else if(n%2)return f(n/2,2*k)+k; else return f(n/2,2*k)-k; } how this program is working and generating output as 9....?
What are the preprocessor categories?
What does c mean in standard form?
what is the defrenece between structure and union
what are the stages of compilation