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 |
44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?
What is the use of a conditional inclusion statement in C?
Explain the difference between the local variable and global variable in c?
Print all numbers which has a certain digit in a certain position eg: number=45687 1 number=4 2 number=5 etc
related to rdbms query .
How can you determine the size of an allocated portion of memory?
What is meant by type casting?
what is mallloc()?how it works?
Why does everyone say not to use gets?
What is a wrapper function in c?
What are the types of data files?
How can you allocate arrays or structures bigger than 64K?