INFOSYS-PAPER10


 

1. int a=2;

f1(a++);

}

f1(int c)

{

printf(“%d”, c);

}

1)fallacy

f()

{

int a;

void c;f2(&c,&a);

 

 

2)a=0;

b=(a=0)?2:3;

a) What will be the value of b? why

b) If in 1st stmt a=0 is replaced by -1, b=?

c) If in second stmt a=0 is replaced by -1, b=?

 

 

3)char *a[2]

int const *p;

int *const p;

struct new { int a;int b; *var[5] (struct new)

 

 

4)f()

{

int a=2;

f1(a++);

}

f1(int c)

{

printf(“%d”, c);

}

c=?

 

 

5)f1()

{

f(3);}

f(int t)

{

switch(t);

{

case 2: c=3;

case 3: c=4;

case 4: c=5;

case 5: c=6;

default: c=0;}

value of c?

 

 

6)Fallacy

int *f1()

{

int a=5;

return &a;

}

f()

int *b=f1()

int c=*b;

}

 

 

7)a)Function returning an int pointer

b)Function ptr returning an int ptr

c)Function ptr returning an array of integers

d)array of function ptr returning an array of integers

(See Scham series book)

 

 

8)fallacy

int a;

short b;

b=a;

 

 

9)Define function ?Explain about arguments?

 

10)C passes By value or By reference?

 

11)Post processed code for

abc=1;

b=abc1; (1 or 2 blank lines are given)

strcpy(s,”abc”);

z=abc;

 

 

12)difference between my-strcpy and strcpy ?check

 

13)f()

{

int *b;

*b=2;

}

 

 

14)Function which gives a pointer to a binary trees const an integer value

at each code, return function of all the nodes in binary tree.(Study)Check

 

 

15)Calling refernce draw the diagram of function stack illustrating the

variables in the —–then were pushed on the stack at the point when

function f2 has been introduced

type def struct

{ double x,double y} point;

main( int argc, char *arg[3])

{double a;

int b,c;

f1(a,b);}

f1(double x, int y)

{

point p;

stack int n;

f2(p,x,y)}

f2(point p, double angle)

{ int i,j,k,int max)

}

 

                                                                                       

5 thoughts on “INFOSYS-PAPER10”

  1. I do agree with all the concepts you’ve presented in your post.
    They’re really convincing and will definitely work. Nonetheless,
    the posts are very short for starters. May just you please lengthen them a little
    from subsequent time? Thank you for the post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s