Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain this code.

#include <stdio.h>

void f1(int *k)
{
*k = *k + 10;
}

main ( ){
int i;
i = 0;
printf (" The value of i before call %d \n", i);
f1 (&i);
printf (" The value of i after call %d \n", i);
}

Answers were Sorted based on User's Feedback



Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main (..

Answer / pooja agarwal

10

Is This Answer Correct ?    11 Yes 0 No

Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main (..

Answer / ankita sharma

answer will be 10. as k has the address of i so when we write *k=*k+10; *k meand that value to which k is pointing so it is pointing to i and i has the value 0 as intial value so 10 would be added to the value of i. so output  will be 10.

Is This Answer Correct ?    0 Yes 0 No

Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main (..

Answer / vivek

it will produce an error as constant cant be added to a pointer

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More C Interview Questions

compute the nth mumber in the fibonacci sequence?

10 Answers   Canon, HPL, Satyam, TCS,


Is this program statement valid? INT = 10.50;

0 Answers  


Why is a semicolon (;) put at the end of every program statement?

0 Answers  


what is the difference between <stdio.h> and "stdio.h"

14 Answers   Invendis, Kanbay, Mastek, MathWorks,


Why c is faster than c++?

0 Answers  


What is the difference between c and python?

0 Answers  


What is the explanation for cyclic nature of data types in c?

0 Answers  


what does data structure mean?

8 Answers  


Explain what’s a signal? Explain what do I use signals for?

0 Answers  


What are structural members?

0 Answers  


Explain how can I manipulate strings of multibyte characters?

0 Answers  


How do you determine a file’s attributes?

0 Answers  


Categories