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...


In the below code, how do you modify the value 'a' and print
in the function. You'll be allowed to add code only inside
the called function.

main()
{
int a=5;
function(); // no parameters should be passed
}
function()
{
/* add code here to modify the value of and print here */
}



In the below code, how do you modify the value 'a' and print in the function. You'l..

Answer / aravind

#include<stdio.h>
void function(void );
int main()
{
int a=5;
function();
}
function()
{
int a=4;
printf("%d",a); /* a here is a local variable*/
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

how to swap two nubers by using a function with pointers?

1 Answers  


Explain pointers in c programming?

0 Answers  


Why #include is used in c language?

0 Answers  


What is pass by reference in functions?

0 Answers  


write a c program in such a way that if we enter the today date the output should be next day's date.

0 Answers  


difference between c and c++?

2 Answers  


Derive the complexity expression for AVL tree?

1 Answers  


Do you know null pointer?

0 Answers  


Explain what is wrong with this program statement? Void = 10;

0 Answers  


How to delete a node from linked list w/o using collectons?

0 Answers   Zycus Infotech,


AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?

13 Answers   HCL,


What is a char in c?

0 Answers  


Categories