[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Basic Concepts - Discussion

Home > C Programming > Basic Concepts > MCQs Questions Discussion

30 / 90

What is the output of the following program ?

#include<stdio.h>
int swap(int *a,int *b)
{
*a=*a+*b;*b=*a-*b;*a=*a-*b;
}
void main() 
{
int x=10,y=20;
swap(&x,&y);
printf("x= %d y = %d\n",x,y);
}

Ax= 20 y = 10

Bx= 10 y = 20

CCompilation Error

DNone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here