write a c program to print the next of a particular no
without using the arithmetic operator or looping statements?



write a c program to print the next of a particular no without using the arithmetic operator or loo..

Answer / sumanta mahapatra

we can do dis using increment operator....
main()
{
int x,y;
x=5;
y=++x;
printf("%d",y);
}

Is This Answer Correct ?    7 Yes 3 No

Post New Answer

More C Interview Questions

Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?

0 Answers   Case, IBM,


What is a MAC Address?

0 Answers  


Is it possible to create recycle bin in mobiles?

2 Answers  


#include<string.h> void main() { String s1[]={"swathi"}; string s2[]={"maddimsetti"}; s1[]=s[]; printf("%s",s1[]); }

3 Answers   IBM,


1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.

0 Answers  


A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?

0 Answers  


What does != Mean in c?

0 Answers  


How to access or modify the const variable in c ?

16 Answers   HCL, HP,


What are operators in c?

0 Answers  


what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);}

9 Answers   TCS,


How do you override a defined macro?

0 Answers  


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

0 Answers   HCL,


Categories