| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 17:28:35 IST
|
|
|
how are the questions.......do you like them??
|
............................................................................................................................................................................................
There's Light at the end of every Tunnel, so KEEP MOVING....
Best of luck to all my mates....
............................................................................................................................................................................................
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 17:35:40 IST
|
|
|
yup nice! good board level
|
---------------------------------------------------------------
* Gaurav Ragtah ( aka Artemis Fowl )
* Agent 'G' [sniper] - SD-6 (Alliance of Twelve)
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 20:13:56 IST
|
|
|
gud ques... m tryin to find my pre boards pprs...as it had som vvery nice ques..
cudn't find it...yet :)
|
Na pine ka shouk tha na pilane ka shonk tha. Hume to sirf NAZREIN milane ka shonk tha. Par kya karen hum nazre hi unse mila baithe jinhe nazron se PILANE ka shonk tha. |
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 21:16:51 IST
|
|
|
assuming all reqd header files r declared, try this
void main( ) { int x[ ] = {10,20,30,40,50}; int *p, **q, *t; p=x; t=x+1; q=&t; cout<<*p<<","<<**q<<","<<*t++<<","<<*(p+3); }
|
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 21:58:20 IST
|
|
|
output:
10,20,30,40
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:00:14 IST
|
|
|
I thought of the same but wen i executed the program i got the output as
10,30,20,40
|
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:03:51 IST
|
|
|
when there r many cout statements at one go(lik in this one) with increment operators, the line is executed from right to left, but printed from left to right.so the right answer is 10,30,20,40
|
|
this reply: 5 points
(with 1 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:03:53 IST
|
|
|
oh!!!!!!!! i got it bcoz during d execution of cout statement d incerement (ie. post/pre) is done 4m right to left so value of **q will b ultimately 30
|
this reply: 2 points
(with 0 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:05:45 IST
|
|
|
t++ is post inc so it shud come as 20 only... but execution is from rite to left so new adress is tht of t++ so 30 so 10,30,20,40
|
Nitwit Blubber Odment Tweak
|
this reply: 2 points
(with 0 
in 1 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:09:32 IST
|
|
|
try this
#include<iostream.h> #include<conio.h> void main() { clrscr(); for(int i=3;~i<0;i--) { for(int j=0;j<=i;j++) cout<<i+j; cout<<endl; } }
|
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:21:26 IST
|
|
|
3 4 5 6 2 3 4 1 2 0
|
VARSHA KRISHNAN....
------------------------------------
IIT is always a word which rises E thru' d body. But 2 achieve it U hav 2 drain out d entire E out of the body....
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:22:30 IST
|
|
|
3 4 5 6 2 3 4 1 2 0
|
Nitwit Blubber Odment Tweak
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:25:33 IST
|
|
|
yes and no. numbers are in right order but not the way they must be aligned. the ans is:-
3456 234 12 0
|
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:26:29 IST
|
|
|
edit: oh sorry thot the {} was for the for loop...
|
Nitwit Blubber Odment Tweak
|
this reply: 0 points
(with 0 
in 0 votes ) [?]
|
|
You have to be logged on to rate
|
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 22 Mar 2008 22:29:10 IST
|
|
|