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
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 |
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 |
what does static variable mean?
Explain what is the difference between a string and an array?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
What is dangling pointer in c?
how to print a statement in c without use of console statement ,with the help of if statement it should print
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.
What is volatile c?
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....
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....?????
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