anonymous
  • anonymous
hey pplll.plz help me with this one .........1-d
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
1 Attachment
anonymous
  • anonymous
What's the main problem you're having?
anonymous
  • anonymous
find the answwer of 1-d

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
void calc(int &a, int b) { cout << a << "\t" << b << endl; a = b++; b = a++; cout << a << "\t" << b << endl; } void main() { int x = 5; calc(x++, ++x); cout << x << endl; } that one?
anonymous
  • anonymous
yes...
anonymous
  • anonymous
i know this is easy ques...but i suck in c++ coz f ma tchr
anonymous
  • anonymous
it's a pretty tricky questions =P so when the program enters calc what would the values and a and b be?
anonymous
  • anonymous
no idea,...
anonymous
  • anonymous
so to begin with x = 5 when you call calc(x++, ++x) x will be incremented before the function and after x = 6 calc effectively gets called with a = 6 and b = 6 this is before a is a reference of x so the first output would be 6 6
anonymous
  • anonymous
make sense?
anonymous
  • anonymous
it does.....
anonymous
  • anonymous
i suppose u r right
anonymous
  • anonymous
awesome do you think you could do the rest now or still a little stuck?
anonymous
  • anonymous
and the second part..
anonymous
  • anonymous
7 8 ?
anonymous
  • anonymous
1 Attachment
anonymous
  • anonymous
almost a = b++; // b is 6 so now a and x are 6, remember this is a post increment b = a++; // a is 6 so now b is 6 and a and x are 7 So the output should be 7 6
anonymous
  • anonymous
okiezz..thanks...and can u answer 1e and 1f
anonymous
  • anonymous
plzz???
anonymous
  • anonymous
I can't read all of 1e
anonymous
  • anonymous
i've attached anotherfile...c above
anonymous
  • anonymous
http://assets.openstudy.com/updates/attachments/4f307b12e4b0fc09381ee8b3-shivamsinha-1328578845370-img_0002.jpg
anonymous
  • anonymous
ok i see now, with 1f you have x = 725 y = 245 a is between 4 and 6 (i'm assuming the random function returns [0, n) ) b is between 2 and 3 do you think you could do this one now?
anonymous
  • anonymous
i said naa.....my c++ 'll improve only aftr a month....oz now i 've joined a coaching class....so plz help me today...:(
anonymous
  • anonymous
for 1f the answer would be a) and 1e the first for loop is working out the length of the string. c strings are terminated by a '\0' the second loop is looping from 0 to the middle of the word and if statement is looking for capital A's and E's since there are no A's or E's in the first half this wont ever happen and in the else it's swapping characters, eg first with last, second with second last etc so the result would be a word that is reversed if it doesn't have any A's or E's in the first half of the word PreboardExam would become maxEbraoberP
anonymous
  • anonymous
hopefully that all makes sense good luck with the c++ =)
anonymous
  • anonymous
tnx a lot...:)

Looking for something else?

Not the answer you are looking for? Search for more explanations.