Note 1
##### Take Note:

Take a note while surfing.

##### Note With Ink

Give your Note a Colorful Tag.

##### Easy to Access

Stay on same information and in Sync wherever you are.

Note 2
##### Take Note:

Organize your information,It may take Shape.

##### Think With Ink

Differ your Content by Color.

##### Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3
##### Take Note:

Don't Let information to miss,Because it take shape

##### Note With Ink

Simple an Easy Way to take a note.

##### Easy to Access

Get the same in next visit.

Please wait...

# C Programming :: Pointers

Home > C Programming > Pointers > General Questions

31. What is the value of u1 and u2.

void main()
{
int u1, u2
int v=3
int *pv;
u1=2*(v+5);
pv=&v;
u2=2*(*pv + 5);
printf("u1=%d, u2=%d", u1, u2);
}

| | | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:  No Tags on this question yet!

32. *ptr++ is equivalenet to:

| | | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:  No Tags on this question yet!

33. The output of the below code fragment is
int d[] = {0, 2, 4, 6, 8};
printf ("%d/n", d? *d + 1 : *d + 2);

| | | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:  Wipro

34. What will be the output of the following program?

#include
int main() {
int x=30, *y, *z;
y = &x; /* Assume address of x is 500 */
z = y;
*y= *z;
x++;
printf("x=%d, y=%u, z=%u\n", x, *y, z);
return 0;
}

| | | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:  Wipro

35. Which of the statements is correct about the following program?

#include
int main() {
int i = 10;
int *j = &i;
return 0;
}

| | | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:  Wipro

36. void main()
{
char *p=""s"Hello";
printf("%s",p);
}
what is the o/p?

| | | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:  Wipro

37. In a certain code language if "METRO" is coded as NGWVT, then how will you cod "MANGO"

| | | Asked In |

Answer: Option D

Explanation:

m e t r o > n g w v t
1st letter is skipping no alphabet
2nd is skipping 1 i.e. f
3rd is skipping 2 i.e. u,v
4th is skipping 3 i.e. s,t,u
Lastly 5th is skipping 4 i.e. p,q,r,s
Hence "m a n g o" will be "n c q k t".

Workspace

Tags:  Syntel Inc.

38. Find the output for the following C program

#include
int main()
{
int var=25,varp;
varp=&var;
varp = 10;
printf("%d %d",var,varp);
}

| | | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:  Cisco

39. What will be the result of the following program?

#include
void print(char *p);
int main()
{
char s[] = "T.C.S", *A;
print(s);
return 0;
}
void print(char *p)
{
while (*p != '\0')
{
if (*p != '.')
printf ("%c", *p);
p++;
}
}

| | | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:  TCS

40. Which of the choices is true for the mentioned declaration?

const char *p;
and
char * const p;

Choose one of them:

| | | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:  TCS