C Programming :: Const / Volatile Qualifier - Discussion
Home > C Programming > Const / Volatile Qualifier > MCQs Questions Discussion
6 / 10
What is the output of the following 'C' program ?
#include <stdio.h>
void fun1(void)
{
static int dummy = 5;
dummy = dummy + 10;
printf("%d",dummy);
}
void fun2(char *c)
{
*c = *c + 2;
printf("%d",dummy);
printf("%c", *c);
}
int main()
{
char ch = 'A';
fun1();
fun2(&ch);
printf("%c", ch);
}
#include <stdio.h>
void fun1(void)
{
static int dummy = 5;
dummy = dummy + 10;
printf("%d",dummy);
}
void fun2(char *c)
{
*c = *c + 2;
printf("%d",dummy);
printf("%c", *c);
}
int main()
{
char ch = 'A';
fun1();
fun2(&ch);
printf("%c", ch);
}
A15CC
B15CA
C155CC
DCompilation error: ‘dummy’ undeclared
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!