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

Answers were Sorted based on User's Feedback



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

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

Answer / Vishvaeep Gupta

In C, you cannot print the next number without using arithmetic operators or looping statements. However, you can create a function that returns the next number in an array, as shown below:n```cnint nextNumber(int arr[], int size, int current) {n if (current >= size - 1) return -1;n return arr[current + 1];n}n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

what does static variable mean?

1 Answers   TCS,


Explain what is the difference between a string and an array?

1 Answers  


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1 Answers  


Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

1 Answers  


What is dangling pointer in c?

1 Answers  


how to print a statement in c without use of console statement ,with the help of if statement it should print

2 Answers   Satyam,


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1 Answers  


What is volatile c?

1 Answers  


what is the difference between arrays and linked list

26 Answers   MAHINDRA, Tech Mahindra, Wipro,


what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....

1 Answers   TCS,


Fifty minutes ago if it was four times as many mints past 3 o clock. how many minutes is it to six o'clock n how....?????

3 Answers   TCS,


what is the difference between : func (int list[], ...) or func (int *list , ....) - what is the difference if list is an array and if also if list is a pointer

2 Answers  


Categories