physics chemistry maths science forums
become expert I help I sign up I login
refer a friend - earn nickels!!   
 advanced
 
Home
Ask & Discuss Questions
Study Material
Experts Zone
Hang Out!

Ask & Discuss Questions with Community & Experts

Moderation Team
 90 chars left    advanced
Ask iit jee aieee pet cbse icse state board community Community Discussion Question: Computer Science....BOARDS.....PRACTISE...........
Forum Index -> Computer Science like the article? email it to a friend.  
Author Message
Aatish (2288)

Blazing goIITian

Olaaa!! Perrrfect answer. 410  [529 rates]

Aatish's Avatar

total posts: 1102    
offline Offline
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 Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
spideyunlimited (3000)

Blazing goIITian

Olaaa!! Perrrfect answer. 498  [753 rates]

spideyunlimited's Avatar

total posts: 2588    
offline Offline
yup nice! good board level

---------------------------------------------------------------
* Gaurav Ragtah ( aka Artemis Fowl )

* Agent 'G' [sniper] - SD-6 (Alliance of Twelve)






 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
avi_1214545 (974)

Blazing goIITian

Olaaa!! Perrrfect answer. 178  [220 rates]

avi_1214545's Avatar

total posts: 318    
offline Offline
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 Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
sugargal_anu (169)

Hot goIITian

Olaaa!! Perrrfect answer. 31  [38 rates]

sugargal_anu's Avatar

total posts: 135    
offline Offline
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);
}


Orkut Graphics - Angels
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
sneha.bagri (142)

Blazing goIITian

Olaaa!! Perrrfect answer. 24  [35 rates]

sneha.bagri's Avatar

total posts: 378    
offline Offline
output:

10,20,30,40
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
sugargal_anu (169)

Hot goIITian

Olaaa!! Perrrfect answer. 31  [38 rates]

sugargal_anu's Avatar

total posts: 135    
offline Offline
I thought of the same but wen i executed the program i got the output as

10,30,20,40

Orkut Graphics - Angels
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
sugargal_anu (169)

Hot goIITian

Olaaa!! Perrrfect answer. 31  [38 rates]

sugargal_anu's Avatar

total posts: 135    
offline Offline
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

Orkut Graphics - Angels
 this reply: 5 points  (with Olaaa!! Perrrfect answer.   in 1 votes )   [?]
 
You have to be logged on to rate
  
sneha.bagri (142)

Blazing goIITian

Olaaa!! Perrrfect answer. 24  [35 rates]

sneha.bagri's Avatar

total posts: 378    
offline Offline
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 Olaaa!! Perrrfect answer.   in 1 votes )   [?]
 
You have to be logged on to rate
  
computer001 (1800)

Blazing goIITian

Olaaa!! Perrrfect answer. 290  [465 rates]

computer001's Avatar

total posts: 1415    
offline Offline
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 Olaaa!! Perrrfect answer.   in 1 votes )   [?]
 
You have to be logged on to rate
  
sugargal_anu (169)

Hot goIITian

Olaaa!! Perrrfect answer. 31  [38 rates]

sugargal_anu's Avatar

total posts: 135    
offline Offline
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;
    }
}


Orkut Graphics - Angels
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
punnima (563)

Blazing goIITian

Olaaa!! Perrrfect answer. 89  [148 rates]

punnima's Avatar

total posts: 438    
offline Offline
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 Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
computer001 (1800)

Blazing goIITian

Olaaa!! Perrrfect answer. 290  [465 rates]

computer001's Avatar

total posts: 1415    
offline Offline
3
4
5
6
2
3
4
1
2
0

Nitwit Blubber Odment Tweak
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
sugargal_anu (169)

Hot goIITian

Olaaa!! Perrrfect answer. 31  [38 rates]

sugargal_anu's Avatar

total posts: 135    
offline Offline
yes and no. numbers are in right order but not the way they must be aligned. the ans is:-

3456
234
12
0

Orkut Graphics - Angels
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
computer001 (1800)

Blazing goIITian

Olaaa!! Perrrfect answer. 290  [465 rates]

computer001's Avatar

total posts: 1415    
offline Offline
edit:
oh sorry thot the {} was for the for loop...

Nitwit Blubber Odment Tweak
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate