Monday, May 24, 2010

C language: Watz the output of this????????????

#include%26lt;stdio.h%26gt;





int fnGetResult(int *piValue)


{


int iRet = *piValue * 2;


*piValue = iRet * 3;


return iRet;


}


int main(int argc, char **argv)


{


int iNum = 10, iRes;


iRes = fnGetResult(%26amp;iNum);


printf("%d %d",iNum, iRes);


return 0;


}

C language: Watz the output of this????????????
60 20
Reply:60 20


C++ language problems?

what means by the numbers 72,77,75,80 from conway's game of life block codes illustrate below, isn't a arrow keys.


{


case 0:k0=getch();


switch(k0)


{


case 72:


if(y%26gt;1)


y--;


break;


case 80:


if(y%26lt;24)y++;


break;


case 75:


if(x%26gt;1)x--;


break;


case 77:


if(x%26lt;80)x++;


break;


}


i will gave 10pts if someone has effort to explain this

C++ language problems?
Complete list of keyscan codes for your reference, click the link below


https://www.glue.umd.edu/~nsw/ench250/sc...





We are using C++ getch() method from the iostream library to scan the key being pressed. You can also refer MSDN library for help on getch() method if you are using Visual Studio. Just select getch and press F1.





Good day bye
Reply:They're the arrow keys on the *numeric* keypad and with caps lock turned off. Pressing those keys returns two keys from getch(): a 0 followed by either 72 (up), 75 (left), 77 (right) or 80 (down).





The other arrow keys on the keyboard return -32 followed by the same extended codes.


I want c program in c language lcd gcd with recursive function?

This example illustrates recursive calls:





int factorial( int num ); /* Function prototype */





int main()


{


int result, number;


.


.


.


result = factorial( number );


}





int factorial( int num ) /* Function definition */


{


.


.


.


if ( ( num %26gt; 0 ) || ( num %26lt;= 10 ) )


return( num * factorial( num - 1 ) );


}











sorry cant find any program of that sort , and to write one i may well take more than one hour.





good luck :)

pokemon cards

What is main diffrence between 'c' language and ' c++ ' why we use c++ is any logic why we indicate '++ '

For the most part, you can say that C is a subset of C++, meaning that most of the facets of C are also legal in C++.





As others have said, C++ is an object-oriented language, as C is an imperative language. An imperative language is a language built for "top-down" programming. For example, in football, a play is called, the quarterback may audible, the ball is snapped... Step-by-step statements.





In an object-oriented language, you build things in terms of objects. Classes are the blueprints for these objects. An object can be anything, you can have a footballTeam object, a quarterback object.. So you can say, "the quarterback" calls an audible, stressing that "the quarterback" class will provide an action in your program. So, you think in terms of objects when writing code.

What is main diffrence between 'c' language and ' c++ ' why we use c++ is any logic why we indicate '++ '
C has been around for a long time, the 70s/80s. Moving up to the next level of C is shown by incrementing to the "next" level. In both C and C++, incrementing to the next integral value is accomplished by the ++ operator..





So the name wizards decided that to incrementing the C language to the next level would be would easily understood by C programmers if were called C++. Believe it or not, a very early language was A, followed by B and then C.... So instead of going to D, they went to C++...





I am in the embedded world, and C is still the predominate language used there. C++ comes with way too much overhead.


But in the application world, PC and web stuff, C++ has become the language of choice, due to the object oriented nature of itl....
Reply:The main difference between 'C' and 'C++' is that 'C' is a procedural programming language while 'C++' is mainly used for OOP (Object-Oriented Programming).





++ in 'C++' means 'C plus class'
Reply:C++ is a superset of C. There are additional features in it, and it supports object-oriented programming. '++' is a unary operator in C and means to increment. Which is why it has a double meaning in C++.


I want c program in c language lcd gcd with recursive function?

To Calculate the GCD of two numbers recursively, you can use


1) Euclid's Algorithm:





int gcd(int m, int n) {


if ((m % n) == 0)


return n;


else


return gcd(n, m % n);


}


OR


2) Dijkstra's Algorithm


int gcd(int m, int n) {


if(m == n)


return m;


else if (m %26gt; n)


return gcd(m-n, n);


else


return gcd(m, n-m);


}


OR


3) BRUTE force guessing


int tryDivisor(int m, int n, int g) {


if (((m % g) == 0) %26amp;%26amp; ((n % g) == 0))


return g;


else


return tryDivisor(m, n, g - 1);


}


In this last one, g is a guess. If the guess works, then it returns the guess. Otherwise, it tries a smaller guess.

I want c program in c language lcd gcd with recursive function?
This might help you with your homework:





http://www.google.co.uk/search?hl=en%26amp;q=l...





Rawlyn.


Is C language is useful in economics?

C-language is useful for programming in computer not economics.

Is C language is useful in economics?
According to me C language is not at all useful in ECONOMICS.





ANYWAYS there are options for each and everything to happen in todays world and a result it could be useful in the future but not at all in present in ECONOMICS.
Reply:At present, C language is not useful in economics.





In future, it will useful in economics also.





But, we know abt that. Its useful for us.
Reply:IF THERE is some calculations then for it c language is very useful
Reply:Economics and Language C has nothing do with each other.





C language is a Computer Programming language where software developers are interested in IT field.





Economics is the branch of social science that deals with the production and distribution and consumption of goods and services and their management.





Basic in computers like Windows, Ms Office and Internet is fine in the field of Economics.
Reply:C language isn't useful in economics..


Free c language website?

could u please

Free c language website?
Open Source Compier:


http://www.bloodshed.net/devcpp.html


Free codes,ideas,algorithms and Utilites:


http://www.imada.sdu.dk/~svalle/courses/...


http://www.planet-source-code.com/


http://www.programmersheaven.com/


http://www.programmingtutorials.com/


http://www.thefreecountry.com/sourcecode...

plum