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 */
}
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 |
what is meant by c
what is the coding of display the factorial of a number using array and function?
writ a program to compare using strcmp VIVA and viva with its output.
What is the function of multilevel pointer in c?
What is the 'named constructor idiom'?
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
proc() { static i=10; printf("%d",i); } If this proc() is called second time, what is the output?
What are identifiers in c?
Write a program using bitwise operators to invert even bits of a given number.
HOW TO FIND OUT THE RREVERS OF A GIVEN DIGIT NUMBER IF IT IS INPUT THROUGH THE KEYBORD BY USING C LANGUAGE
discuss the steps needed to get a program from source code to executable in a system?
Explain two-dimensional array.