What will be the output of the program?
#include<stdio.h>
int

Home | Discussion Forum

What will be the output of the program?

#include<stdio.h>
int main()
{
void fun(char*);
char a[100];
a[0] = 'A';
a[1] = 'B';
a[2] = 'C';
a[3] = 'D';
fun(&a[0]);
return 0;
}
void fun(char *a)
{
a++;
printf("%c", *a);
a++;
printf("%c", *a);
}

View More Related Question

2) There is a error in the below program. Which statement will you add to remove it?

#include<stdio.h>
int main()
{
int a;
a = f(10, 3.14);
printf("%d\n", a);
return 0;
}
float f(int aa, float bb)
{
return ((float)aa + bb);
}

3) The keyword used to transfer control from a function back to the calling function is

4) What will be the output of the program?

#include<stdio.h>
int func1(int);
int main()
{
int k=35;
k = func1(k=func1(k=func1(k)));
printf("k=%d\n", k);
return 0;
}
int func1(int k)
{
k++;
return k;
}

5) What will be the output of the program?

#include<stdio.h>
int i;
int fun1(int);
int fun2(int);

int main()
{
extern int j;
int i=3;
fun1(i);
printf("%d,", i);
fun2(i);
printf("%d", i);
return 0;
}
int fun1(int j)
{
printf("%d,", ++j);
return 0;
}
int fun2(int i)
{
printf("%d,", ++i);
return 0;
}
int j=1;

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.