my final questions help please

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 2
Reputation: svetlana6167 is an unknown quantity at this point 
Solved Threads: 0
svetlana6167 svetlana6167 is offline Offline
Newbie Poster

my final questions help please

 
0
  #1
Nov 29th, 2008
1. printf("%d", 10*5/10); what is this result?

2. printf("%d", 10+5-5); what is this result?

3. a=d++ +(b=a); a=4,b=4,d=4 a=?

4. c=a+ a++ - b--; a=4,b=4 c=?

5. c=a+ ++a - b--; a=4,b=5 c=?

6. if(a==0 && b==0) printf("1);
else
if(a==0 && b==0) printf("2");
else printf("3");

(if a=1 and b=0) what is the result?
(if a=0 and b=0) what is the result?
(if a=0 and b=1) what is the result?

please help me thanks regards...
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,803
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: my final questions help please

 
0
  #2
Nov 29th, 2008
Originally Posted by svetlana6167 View Post
1. printf("%d", 10*5/10); what is this result?

2. printf("%d", 10+5-5); what is this result?

3. a=d++ +(b=a); a=4,b=4,d=4 a=?

4. c=a+ a++ - b--; a=4,b=4 c=?

5. c=a+ ++a - b--; a=4,b=5 c=?

6. if(a==0 && b==0) printf("1);
else
if(a==0 && b==0) printf("2");
else printf("3");

(if a=1 and b=0) what is the result?
(if a=0 and b=0) what is the result?
(if a=0 and b=1) what is the result?

please help me thanks regards...
Looks like a homework dump. Have you tried it? At least cut and paste numbers 1 and 2 into a program and run it and see for yourself. You'll find out exactly what the result is.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 13
Reputation: gautam610 has a little shameless behaviour in the past 
Solved Threads: 3
gautam610 gautam610 is offline Offline
Newbie Poster

Re: my final questions help please

 
0
  #3
Nov 30th, 2008
ya u can see all by just putting them in to your simple program and check the result...................
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: my final questions help please

 
0
  #4
Nov 30th, 2008
Or you could just spam the crap out of the online forums and waste peoples time in parallel.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 2
Reputation: svetlana6167 is an unknown quantity at this point 
Solved Threads: 0
svetlana6167 svetlana6167 is offline Offline
Newbie Poster

Re: my final questions help please

 
0
  #5
Nov 30th, 2008
no i dont wanna do spam.i ask my question there toobecause i dont know how to use a complier.please help me...
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,803
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: my final questions help please

 
0
  #6
Nov 30th, 2008
Originally Posted by svetlana6167 View Post
no i dont wanna do spam.i ask my question there toobecause i dont know how to use a complier.please help me...
Cross-posting is considered bad etiquette since it wastes people's time. You have someone answering a question that's already been answered on another forum because they didn't know about it.

You need to learn to use a compiler, period. You cannot program without experimentation. You cannot experiment without actually compiling and running programs. There are lots of good compilers and IDEs out there, including:

Code Blocks
Dev C++
Microsoft Visual Studio Express

The above are all free. Install one, type in your program, compile and run it.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,810
Reputation: ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all ithelp is a name known to all 
Solved Threads: 117
ithelp's Avatar
ithelp ithelp is offline Offline
Posting Virtuoso

Re: my final questions help please

 
0
  #7
Dec 1st, 2008
Originally Posted by svetlana6167 View Post
no i dont wanna do spam.i ask my question there toobecause i dont know how to use a complier.please help me...
gcc a.c .
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC