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

write a program to insert an element at the specified position in the given array in c language

5 Answers   Appin, IBM,


What is the easiest sorting method to use?

0 Answers  


Which command is more efficient? *(ptr+1) or ptr[1]

3 Answers  


What is const keyword in c?

0 Answers  


what is purpose of fflush(stdin) function

4 Answers  


find largest element in array w/o using sorting techniques.

3 Answers   Zycus Infotech,


What functions are used in dynamic memory allocation in c?

0 Answers  


What is a structural principle?

0 Answers  


Explain the use of 'auto' keyword in c programming?

0 Answers  


How would you rename a function in C?

0 Answers   Tech Mahindra,


Is it possible to run using programming C for Java Application?

2 Answers   NIC,


What is the use of c language in real life?

0 Answers  


Categories