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

Can the “if” function be used in comparing strings?

0 Answers  


write a program to compare 2 numbers without using logical operators?

5 Answers   IBM,


I have a function which accepts a pointer to an int. How can I pass a constant like 5 to it?

3 Answers  


write a program to interchange the value between two variable without using loop

1 Answers  


What is a struct c#?

0 Answers  


Is c weakly typed?

0 Answers  


Do you know pointer in c?

0 Answers  


What is string concatenation in c?

0 Answers  


What are conditional operators in C?

0 Answers   Adobe,


Write a C program where input is: "My name is xyz". output is: "xyz is name My".

1 Answers   TCS,


What are the applications of c language?

0 Answers  


Why main function is special give two reasons?

0 Answers  


Categories