How to combine increment and decrement statements into one single statements [closed] - c

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How can i combine one increment and one decrement statements into one single statement in C language.
ex: a++ and b-- into one single statement.

Write a++,b--;
Two expressions separated by a comma are evaluated left to right.

Related

Address fields to combine with comma , with null check [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 days ago.
Improve this question
Trying to add address fields with comma at the end of the field , but if any one of the field is missing i am getting multiple comma's

How to make sparse array c language without condition I !=o? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 days ago.
Improve this question
How to make sparse array c language without condition i !=0 ??
I tried i!=0 condition but teacher doesn't want that
Teacher wants another path ??

my project has diffrent result every time [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I wrote this code in my project but every time i run it the answer is diffrent.
]1
Initialize sum with a value of 0. The reason it is different every time is you are calling sum which you never assigned a value. Anything could be in memory where sum is stored, which is why your results are inconsistent.

How to create an example for the complex statement? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
There is a complex statement in my textbook:
int (*f(float (*)(long),char *))(double);
I want to create an example for illustrating how to use this statement, although I understand the meaning of the statement, it's hard for me to write the example. Can anyone help me?
P.S.: C language.
int (*f(float (*)(long),char *))(double)
f is a function that has 2 parameters of type
float (*)(long), << pointer to function long=>float
char * << string
and returns
(int)(*)(double) << a pointer to a function double=>int

For Loops in C to print out individual ints. [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to print out each integer of an int individually using a for loop. I am doing this because I want to print things in between some of the single ints. So if the number was 4564, I want to print out 4 5 6 4. Is there a quick way to do this?
I know how to do it in java but I am new to C and am not sure.
Something like this shall help
while(num!=0) {
printf("%d", num%10); //your last digit, you can store it in an array of characters as well
num = num/10 ;
}
Note : you've got to reverse the order while using the digits

Resources