Consider the following function:
void test_a(int n)
{
cout << n << " ";
if (n>0)
test_a(n-2);
}
What is printed by the call test_a(4)?
► 4 2
► 0 2 4
► 0 2
► 2 4
Consider the following pseudo code
declare a stack of characters
while ( there are more characters in the word to read )
{
read a character
push the character on the stack
}
while ( the stack is not empty )
{
pop a character off the stack
write the character to the screen
}
What is written to the screen for the input "apples"?
► selpa► selppa
► apples
► aaappppplleess
--On Mon, Jul 11, 2011 at 10:21 AM, meerub hayat <meerubhayat@gmail.com> wrote:
For compiler a postfix expression is easier to evaluate than infix expression?
► True
► False
--{ALLAHA is great}
{ALLAHA is great}
--
--
You received this message because you are subscribed to the Google Groups "Pak Youth" group.
To post to this group, send email to pak-youth@googlegroups.com.
To unsubscribe from this group, send email to pak-youth+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pak-youth?hl=en.
No comments:
Post a Comment