1,272 views
0 0 votes

What is the output of following program?
int i ;
main ( )
{
int j;
for (; ;)
{
if (j = function (i))
printf (“j = %d \n”, j)
else
break;
}
}
function (x)
{
int x ;
static int v = 2;
v - - ;
return (v – x);
}

  1.   j = 1
  2.   j = - 1
  3.   j = 2

1 Answer

1 1 vote
is j=1 is the answer???
Position:
Show:

Related questions

1 1 vote
1 answers 1 answer
1.6k
1.6k views
manisha11 asked Sep 10, 2018
1,567 views
/ find ouput *#include <stdio.h>int main(){ { int a [3] ={{ {2,4} , {7 ,8} , {3,4} }, {{2 ,2}, {2, 3},{2, 3},{3,4} } }; printf (...
0 0 votes
0 0 answers
1.2k
1.2k views
srestha asked Mar 7, 2018
1,177 views
#include<stdio.h int fun1(int x) { x=14; } int fun2(int x) { x=20; } int main() { int(*p)(),m,n; scanf("%d",&m); if(m) p=fun1; else p=fun2; n=(*p)(); printf("%d",n); retu...
0 0 votes
0 0 answers
674
674 views
srestha asked Mar 6, 2018
674 views
#include<stdio.h int main() { char a[]={'A','B','C','D'}; char *p=&a[0]; *p++; printf("%c%c",*++p, *p); }What will be the output?1)C B2)B B3)B A4)C A
0 0 votes
0 0 answers
1.2k
1.2k views
Parshu gate asked Dec 5, 2017
1,160 views