Friday, May 21, 2010

What is the code for the program C Language?

I've been looking for a code for the program to run, the program is called C Language, and it is our project to discover its code,

What is the code for the program C Language?
I'm not 100% sure if this is what you're asking for, but search for the GCC compiler. It's an open source C compiler that runs on a variety of operating systems.
Reply:Sounds like DOS to me


In the programming language C++, what does the function exit() do, and how do you use it?

I understand that it is a command to exit the program, but what I *don't* understand is why I see a number inside the () as a parameter. In some examples, I see people calling the function and it looks like this: "exit(8);". What is the 8 doing inside the parentheses...?

In the programming language C++, what does the function exit() do, and how do you use it?
It is a return code from the program. The shell that ran the program can check to see if the program exited with an error or normally. I believe return 0 is for normal exit, and return anyother number is for an error.


I know a little bit of C programming, and I've been studying it for a few months now...since april!?

In june, I took a long break, since August(in this time...never opened a c book or wrote a c program!) And I hated it after that...I felt like I lost someone I love! Now, if you do not practice a programming language for a while, do you forget?





And one more question...give me an idea for a useful console C program! I am out of ideas...don't know what to do!

I know a little bit of C programming, and I've been studying it for a few months now...since april!?
It can be difficult to remember the details when it comes to a programming language of any kind if you haven't used it for a while, so don't sweat that problem. All you have to do is find a review on 'C' programming and you'll be fine.





I wrote 3 interesting and informative programs for the console when I was learning and reviewing C++ coding. The first one was a pretty simple application I used to replicate Pascal's Triangle. The user was asked to input some data and the program would output the corresponding data in the triangle.





The 2nd Program I wrote was pretty fun, because I was learning to read and write binary, hex, and Octal in a computer science class. I decided to write a console program that could automatically convert the numbers to their corresponding base-n digits, and even used it during a test! How cool!





The 3rd Program was far more complicated, and was written in both C++ and Java. I was taking "Intro to Java" at Cabrillo College in Aptos, CA, and we had to write a program of our own making for the final project. It was funny, because I made a text-based console game with a controllable character, (quite literally, the character was the letter 'a'), and I ran the game in it's own thread, updating the screen every 10 seconds. The game used character identification for collision detection, and allowed the player to maintain an inventory of gold, weapons, and useful tools. What was funny about this is that I didn't realize the application had to be graphical, not console, and so with two days left I was forced to convert everything over to bitmaps. Unfortunately, this created a major problem with collision detection, and I wasn't familiar enough with threads, so the final project wasn't what it was supposed to be.





Anyhow, it is easy to forget a language, but what you should never forget is how to solve a problem in pseudocode. As long as you know how to write an algorhythm, it will always just be a matter of time before you get the program you want. Of course, I'm sure you already know that.





Good luck with this stuff, and feel free to ask for help on my site, listed below.


-Andy
Reply:No Problem. I'm always happy to help. Report It

Reply:Yes.





www.bloodshed.net





Download free


DevC++

lotus flower

Comp programming C++ converting to diff base?

I need to write a program that will ask the user for a base 10 number in the range 1 to 4,000,000,000. Then display the number in every number base from 2 to 36 on one screen.





I know i need to write a function that you send the number and the base, and it prints the converted representation.





I also know my function should use the repeated division/remainder algorithm to convert the number. I'll keep the remainders in an array until complete, then print the corresponding digits in reverse order (since the last remainder represents the first digit).











I just am totally lost on how to start this...


I only know the C++ language so if you can help me out in this language only, that would be great





Any help would be amazing. Thanks!

Comp programming C++ converting to diff base?
int conv (int base, long no, char* str)


{


if(no==0) strcpy(str,"0");





int count = 0;


char ct[256] = "";


char* ult = ch;





do{


*ult = no%base;


ult++;


no= no/base


}while(no%26gt;=0);





strcpy(ultt,_strrev(ult));


strcpy(str,ult);





}


How can I use pointers in C# programming?

There are several restrictions to using pointers in C#. I've included a link to the MSDN section on using pointers in C# below.





I would encourage the use of objects instead of pointers if you can get away with it. Pointers are considered "unsafe" types, and must be included in trusted assemblies (if compiled into an assembly) to be accessed.





I believe pointers in C# (or .NET for that matter) are allocated on the heap, unless you call stackalloc to explicitly allocate them on the stack. They are declared with an * after the type declaration for multi-pointer declarations, or an * before the variable name for single pointer declarations. Two asterisks indicate a pointer to a pointer.





Also, any methods where a pointer is declared/used must be declared with an "unsafe" declaration before the method declaration.





You can obtain further information at the URL below.

How can I use pointers in C# programming?
The design of C# is to avoid the use of pointers. "Managed Code" is what it's called. For the most part you shouldn't need pointers in C# but you still have the ability to use pointers in C# but its strongly discouraged.
Reply:Hi


Pointer is a powerful tool in 'C', it is used to know the memory address of a variable/identifier/value


Pointers are also helpful in transfer more than one values/variables/identifiers from main program/function to another function


Which one is the most suitable for programming(c++ and java) windows or mac?

Java is more portable. Use C++ if you need the extra performance.

Which one is the most suitable for programming(c++ and java) windows or mac?
JavaScript is much easier and there is more support and pre-made scripts available on the internet.





C++ is for professionals and is also very slow.





You might want to try PHP as well, that is very useful.
Reply:I haven't programmed on Macs. But if it is going to be Windows, I'd rather stick with Java and stay far away from using C++ until there is no other choice. Opinion from my recent experience in using VC++ for a project on Windows.
Reply:Java and Windows are more suitbale as people mostly using Windows and Java is paltform independent.
Reply:linux, especially when you want to write C++ code. No other platform has better developer support.
Reply:I'd guess there is a lot more information on Windows programming. More people use Windows, so your program has a bigger target audience. More games are written for Windows. There is more demand for Windows programmers than Mac.





Despite all that, it really makes no difference. It's more a matter of what you want to program than what system it run's on. For example if you needed database access, what system will the database run on?





BTW, C++ is not slow at all. If you were using them for the same tasks it would be much faster than Javascript.
Reply:i have never programmed on a mac, but a very knowledgeable friend of mind has a mac with both windows and mac, and would use windows to program. Xcode (the mac c interface) is not as good of a program as VisualStudio from what i have heard. If you want to learn the intricacies of programming( makefiles, etc) get yourself a linux distro and program with a basic editor( Emacs, Vm) and compile in the terminal using g++.


Background music in C programming?

can i put backgroound music on C programming? my compiler is MingW.

Background music in C programming?
yes u can .................baby
Reply:Do you want to listen to music while writing code? Please go ahead. Vast majority of programmers do so. Use your favourite mp3 player.





If that was not the answer you were looking for, re-phrase your question.
Reply:yes u can u can get the code from programmersworld.com

silk flowers