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 |
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
a memory of 20 bytes is allocated to a string declared as char *s then the following two statements are executed: s="Etrance" l=strlen(s); what is the value of l ? a.20 b.8 c.9 d.21
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is mean by data types in c?
How do you write a program which produces its own source code as its output?
Is printf a keyword?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What was noalias and what ever happened to it?
Tell me can the size of an array be declared at runtime?
Do you know the purpose of 'register' keyword?
How can I avoid the abort, retry, fail messages?
Define VARIABLE?