#define swap1(a,b) a=a+b;b=a-b;a=a-b;
main()
{
int x=5,y=10;
swap1(x,y);
printf("%d %d\n",x,y);
swap2(x,y);
printf("%d %d\n",x,y);
}
int swap2(int a,int b)
{
int temp;
temp=a;
b=a;
a=temp;
return;
}
what are the outputs?
Answer Posted / goodhunter
10 5
10 5
| Is This Answer Correct ? | 20 Yes | 2 No |
Post New Answer View All Answers
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is the difference between memcpy and memmove?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
Explain what is page thrashing?
How can you tell whether two strings are the same?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
What are linker error?
Differentiate between #include<...> and #include '...'
What is a void pointer in c?
What is use of #include in c?
What are the parts of c program?
What is the difference between printf and scanf )?
What is function what are the types of function?
Do array subscripts always start with zero?
How can you allocate arrays or structures bigger than 64K?