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 |
write a program to insert an element at the specified position in the given array in c language
What is the easiest sorting method to use?
Which command is more efficient? *(ptr+1) or ptr[1]
What is const keyword in c?
what is purpose of fflush(stdin) function
find largest element in array w/o using sorting techniques.
What functions are used in dynamic memory allocation in c?
What is a structural principle?
Explain the use of 'auto' keyword in c programming?
How would you rename a function in C?
Is it possible to run using programming C for Java Application?
What is the use of c language in real life?