Call Support +91-85588-96644
TCY online

Login

Sign Up

Please enter a Username or Email ID
Please enter a password
Keep me logged in
Please enter your name
Please enter your mobile number
You can't leave Captcha Code empty
By submitting this form, you agree to the Terms & Privacy Policy.
OR

Sign Up via Facebook

Sign Up via Google

Sign Up via Twitter

Download Software
Tests given

Download TCY App

OR
App Image
Discussion

Official Java/Oracle /C/C++ Preparation for Information Technology

Shared from Arrays and Pointers on Jan 07, 2019 3:44 PM

If input for a and b are 9 and 4 respectively, what would be the output of the following C code?
void Calculate(int *,int *,int *);
void main()
{
int a = 0, b = 0, c = 0;
scanf(%d,&a);
scanf(%d,&b);
Calculate(&a,&b,&c);
printf(%d,c);
getch();
}
void Calculate(int *p,int *q,int *r)
{
*r = *p +*q;
}

 
0
13
Compile error
Runtime error

Reply


Please type your answer before submitting.
Submit

Lol its a compiler error at scanf() itself, it should be scanf("%d",