DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   my final questions help please (http://www.daniweb.com/forums/thread160047.html)

svetlana6167 Nov 29th, 2008 10:08 pm
my final questions help please
 
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...

VernonDozier Nov 29th, 2008 10:53 pm
Re: my final questions help please
 
Quote:

Originally Posted by svetlana6167 (Post 747168)
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.

gautam610 Nov 30th, 2008 2:43 am
Re: my final questions help please
 
ya u can see all by just putting them in to your simple program and check the result...................

Salem Nov 30th, 2008 2:56 am
Re: my final questions help please
 
Or you could just spam the crap out of the online forums and waste peoples time in parallel.

svetlana6167 Nov 30th, 2008 12:53 pm
Re: my final questions help please
 
no i dont wanna do spam.i ask my question there toobecause i dont know how to use a complier.please help me...

VernonDozier Nov 30th, 2008 12:59 pm
Re: my final questions help please
 
Quote:

Originally Posted by svetlana6167 (Post 747438)
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.

ithelp Dec 1st, 2008 4:43 am
Re: my final questions help please
 
Quote:

Originally Posted by svetlana6167 (Post 747438)
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 .


All times are GMT -4. The time now is 5:06 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC