How to write the code of the program to swap two numbers
with in one statement?
Answers were Sorted based on User's Feedback
Answer / rajitha
#include<stdio.h>
main()
{
int a=3,b=4;
b=a+b-(a=b);
printf("%d",a);
printf("%d",b);
}
Is This Answer Correct ? | 19 Yes | 4 No |
Answer / manoj kumar shukla
main()
{
int a=4,b=3;
a=a+b-(b=a);
printf("%d",a);
printf("%d",b);
}
Is This Answer Correct ? | 6 Yes | 2 No |
What is a lvalue
What is const keyword in c?
main() { struct test { char c; int i; char m; } t1; printf("%d %d\n", sizeof(t1), sizeof(t1.c)); }
1 Answers Vector, Vector India,
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
write a statement to display all the elements array M(in reverse order? int M[8]={20,21,22,23,24,25,26,27};
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
find second largest element in array w/o using sorting techniques? use onle one for loop.
15 Answers BitWise, Zycus Infotech,
What is dynamic dispatch in c++?
How many bytes are occupied by near, far and huge pointers (dos)?
how do u find out the number of 1's in the binary representation of a decimal number without converting it into binary(i mean without dividing by 2 and finding out the remainder)? three lines of c code s there it seems...can anyone help
Tell me the use of bit field in c language?