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

what is meant by c

9 Answers   INiTS,


what is the coding of display the factorial of a number using array and function?

1 Answers  


writ a program to compare using strcmp VIVA and viva with its output.

0 Answers  


What is the function of multilevel pointer in c?

0 Answers  


What is the 'named constructor idiom'?

0 Answers  


5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.

0 Answers  


proc() { static i=10; printf("%d",i); } If this proc() is called second time, what is the output?

7 Answers   Hughes,


What are identifiers in c?

0 Answers  


Write a program using bitwise operators to invert even bits of a given number.

2 Answers  


HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE

3 Answers   Wipro,


discuss the steps needed to get a program from source code to executable in a system?

1 Answers  


Explain two-dimensional array.

0 Answers  


Categories