swap two integer variables without using a third temporary
variable?
Answer Posted / onkar koparde
i'll only give u logic #include<stdio.h>
void main() { int a=10,b=20;
printf("b4 swap:a=%d b=%d",a,b);
a=a+b;b=a-b;a=a-b; printf("aftr
swap:a=%d b=%d",a,b); }
from-onkar.koparde@gmail.com
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What is adt in c programming?
Where we use clrscr in c?
Explain what is a stream?
What is pointer & why it is used?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
Are comments included during the compilation stage and placed in the EXE file as well?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
What does %p mean?
Explain what’s a signal? Explain what do I use signals for?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
Why c is called procedure oriented language?
write a program fibonacci series and palindrome program in c
Write a function that will take in a phone number and output all possible alphabetical combinations
What does == mean in texting?
What is structure data type in c?