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.

C Programming :: C Preprocessor

Home > C Programming > C Preprocessor > General Questions

21. Consider the macro definitions

#define square (x) x*x
and #define square (x) (x*x)

when used in a program statement B=++square(C)

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

22. The output of the following program is

#define two (x) 2*x
#define ddouble (x) x + x

void main()
{
int num, sum, product;
num = 1;
sum = - two (num); sum = -(sum + 1);
product = - ddouble (num);

printf ("%d%d/n" ,sum,product);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

24. What are the value sprinted by the following program?

#define dprint(expr)printf(#expr "=%d\n",expr)
main() {
int x=7;
int y=3;
dprintf(x/y);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Wipro 

25. #include
#define maxval 5
int main (void)
{
int i=1;
if(i-maxval)
{
printf("inside");
}
else
{
printf("out?");
}
}
What will be printed.

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

26. #include
#define a 3+3
#define b 11-3
void main()
{
printf("%d",a*b);
}
What will be printed.

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

27. Macros and function are related in what aspect?

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

28. Preproconia does not do which one of the following

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

29. Find the output for the following C program

#define d 10+10
main()
{
printf("%d",d*d);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

Cisco 

30. #include
#define max(a,b) (a>b?b:a)
#define squre(x) x*x
int main()
{
int i = 2, j = 3, k = 1;
printf ("%d %d", max(i,j), squre(k));
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!