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 a spanning Tree?
What are qualifiers?
for (i <= 5 && i >= -1;++i; i > 0) { printf("%d ", i); }
the number 138 is called well ordered number because the three digits in the number (1,3,8) increase from left to right (1<3<8). the number 365 is not well ordered coz 6 is larger than 5. write a program that wull find and display all possible three digit well ordered numbers. sample: 123,124,125,126,127,128,129,134 ,135,136,137,138,139,145,146,147 148 149,156.......789
if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND CORRESPONDING VALUE FROM ASCII TABLE
void main() { int i=5; printf("%d",i++ + ++i); }
Can variables be declared anywhere in c?
What is the difference between array and linked list in c?
Are there namespaces in c?
How would you sort a linked list?
Explain what is operator promotion?
Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?