Monday, May 24, 2010

Where can I find C programming language?

I want to learn C


I have purchased a tutorial book "Let us C"


I have a computer at home


I have downloaded compiler "turbo C"


but it's no working


I think C is not installed in my pc


Can anyone help me


Plz...

Where can I find C programming language?
Turbo C is old, may not be compatible with today's 32-bit OS.





C-Free 4.0 seems to be widely used, try the link below:
Reply:Contact with near computer shop,


they can help you to install C++ in your computer.
Reply:I use Dev-C++, you can give that a try.





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





Microsoft Visual C++ is probably the best one, but it costs money.


What is a good compiler for c/c++?

hey im looking for a free compiler for these computor languages.. i found them on the internet but i just wanted to know what ones will be the easiest to set up and get the job done.. thx

What is a good compiler for c/c++?
I'm using Microsoft Visual C++ 2005 Express Edition.


http://msdn.microsoft.com/vstudio/expres...
Reply:bloodshed devc++

magnolia

C++, what am i doing?

Hey guys,


I've been learning a lot about C++ programing


lately, [i got the for dummies book, lol XD]


and i've been trying to figure out:


All the programs i've created so far run


through the console...


In my compiler [Dev-C++] it gives you the option


to create a windows application as well,


and when i looked at the .cpp for it, it was gibberish.





Is that still coded in C++? and if so,


where do i learn how to program it?





10pts for a good answer XD

C++, what am i doing?
Yes, its still C++, but when you get into GUI programming, much of the work is done with object libraries.





To get an idea, Visual C++ has a tutorial of what you have to do to get a simple "hello world" GUI going. Its a lot of code. The Ojbect libraries help a lot to minimize the work you're doing.





Also, if you're looking at Visual C++ code, you might be looking at MFC, which uses Macros. A Lot. Which makes the code look almost alien.





Once you know what the macros mean, you'll see they do turn into library calls, which is just plain old C++





Best of luck.
Reply:The Windows application is when the program talks to the Windows operating system itself. The syntax and programming is still, however, C++. (Same operators for math, strings, etc). I learned Win32 quite easily from


http://www.functionx.com/win32/Lesson01....


That site goes from making a window to making a simple game. The Win32 API is generally used for getting input for graphical user interfaces (instead of the plain black command prompt). It supports making shapes, showing images, and getting mouse/keyboard input. It also provides ways of altering processes (Videogame hacks for example). Some useful libraries in Win32 are:


kernel.h (Control processes and other important stuff)


Winsock.h (Networking)


Windows.h (Has almost everything).


If you know Win32, you can basically do everything other than full fledged video games on windows. (Then you can learn DirectX and do everything). Good luck :)


(Note that the tutorial uses Borland, for Dev C++, just ignore all the things that start with # that are not #include or #define.


Can anyone explain this simple & shocking behaviour of C?

I am using gcc compiler(linux)....





C program ----%26gt;





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


int main()


{





char c,d;


printf("pls give in character1\n");


scanf("%c", %26amp;c);


printf("pls give in character2\n");


scanf("%c", %26amp;d);


printf("The program ends\n");





}








THE ACTUAL O/P :-----%26gt;





pls give in character1


a


pls give in character2


The program ends








THE DESIRED O/P :-------%26gt;


pls give in character1


a


pls give in character2


b


The program ends








Why is the compiler bypassing the second scanf() ???????????/


does anyone know it why????





( Please note that i have tried using fflush(stdin) also.... but it makes no difference )

Can anyone explain this simple %26amp; shocking behaviour of C?
Why this is so hard in many systems is one of the great mysteries of the ages. On some systems the flush works, on others it doesn't. The standard does not seem to care.





Here is what I do:


------------


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


int main()


{





char c,d;


char junk[1000];


printf("pls give in character1\n");


scanf("%s", junk);


c = junk[0];


printf("pls give in character2\n");


scanf("%s", junk);


d = junk[0];


printf("The program ends '%c', '%c'\n", c, d);





}


------------





It works like a charm every time.
Reply:hey mam....i ve tried using fflush(stdin); and it worked....


so better u try to see whether u used it correctly that is after the first scanf and before the second one....


*****


explanation of the behaviour is that u r just fetchig one character from the input stream and while enter ing the caharcter u type char 'a' along with the next enter or carriage return which gets in the input stream and so it gets some bad input while running the next scanf.... it fetches the bad input from stream....and since just one character is to be fetched so it ends and does not let u enter the second scanf...and goes to end of program....











hope u find ur way..bye....tc


choose this as BEST ANSWER............:))))
Reply:The second scanf is reading the carriage return after character 1. Add one more scanf to read the carriage return.
Reply:What happens if you do:





char c;


char d;


Programming in C++?

Hi





I've been into computers for a long time and i've been


looking for a good 'compiler' for C++


i have turbo C++ but no matter what code i use


it error's, can anyone give me a compiler apart from


Visual C ect...

Programming in C++?
My favorite free C++ development environment it to use the version of g++, the C++ interface to gcc, that comes optionally with cygwin, the windows-based GNU/Linux emulator.





Along with that I use Eclipse with the CDT plugin as my IDE. All three are free. All three are professional grade (not crippled freeware versions of $ware dev environments). All three work together very well and are not trying to sell you anything.
Reply:GCC, it's completely free and open-source.





http://gcc.gnu.org/
Reply:borland c++
Reply:Bloodshed Dev-C++ (its the one we use in the class)


free and good.


http://www.bloodshed.net/devcpp.html
Reply:mingw developer studio





free
Reply:Here ya go. A whole list of compilers with links:





http://www.thefreecountry.com/compilers/...





Turbo C++ is very good but out of date. I'm VERY fond of Digital Mars C Compiler which with the STL library will compile C++ (in the latest iterations) but it can be challenging to install. I've switched to Linux, too, so I have GCC installed as a matter of course. Windows ports of GCC include Dev-C++ (which includes mingw), and Cygwin which is essentially a Unix emulator for Windows with GCC. I've actually used most of them, but I've been using C since about 1990.
Reply:It's worth mentioning that MinGW is a port of GCC (which is a Linux compiler), and Dev-C++ is an IDE that uses MinGW (by default)... essentially, if you're on a Windows platform, everyone above has suggested the exact same thing, whether they know it or not.





On the plus side, MinGW's port of GCC is easily the best compiler on Windows and Dev-C++ is not half bad for an IDE. You may also consider Code::Blocks which is another IDE that uses GCC.





Good luck on your decision.
Reply:Dev C++ is what I use
Reply:Turbo C++ was developed prior to the standardization of C++, so modern C++ code will invariable fail to compile with it. There is absolutely NO reason to still use this product today. In fact, it's a DOS app, if you tried to run it in Windows Vista, it wouldn't even run.





There are multitudes of compilers and IDEs for C++. I am going to make a few assumptions based on your question: you are running windows and you really want an IDE (integrated development environment) rather than just a compiler.





Here are my suggestions:


http://www.codeblocks.org/ (very lightweight, but advanced)


http://www.eclipse.org/cdt/ (this is a beast, written in java, but it's got a lot of features)


http://www.bloodshed.net/devcpp.html (no longer developed, but is easy to use)





There are many more free IDEs for Linux and Windows. If you're just looking to compile a simple one file program (hello world type) you can just use a compiler -- gcc will work. Mingw is a windows native(ish) version of gcc, but it's a little confusing to install. Another option is to download Cygwin and install gcc inside that.


See www.mingw.org and www.cygwin.com


Converting a program from C++ to C?

Basically I have a C++ program that I am trying to convert into C. I have no knowledge of C but from what I have gathered on the internet I have made a few changes to my program. However, I am assuming that my program does not compile with C. Therein lies my other issue; I am using a windows XP operating device with a C++ developer software, but I have no compiler for C.





Does anyone know where I could find a compiler for C so that I can check my code and make sure it compiles correctly?





Also, in Additional Details I will provide my program and if you can spot anything that would utterly fail in C, please let me know. Any advice and help is greatly appreciated.

Converting a program from C++ to C?
You assume incorrectly. There is nothing in the code posted here that needs to be converted. There a couple of omissions through.





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





double convertTemp(double);


void printDate(char []);








int main()


{


const int SIZE = 10; /*change this to whatever*/





char type[SIZE];


double sum = 0;


int count = 0;


double test = 0;


double temp[SIZE]; /*fill in before calling convert */


char date[12]; /*fill in before you print*/





printDate(date);


convertTemp(test);


}











double convertTemp(double temperature)


{





double celsius = 0;


celsius = (5.0/9)*(temperature-32);


return celsius;





}








void printDate(char date[])


{


printf("%s\n", date); /*print statement */


}
Reply:If you have C++ code and a C++ compiler...why not just keep it as C++?
Reply:Your code will compile and run in standard C except that it won't do anything useful :-P





Good free C compilers:


MinGW - http://www.mingw.org/


Pelles C - http://www.smorgasbordet.com/pellesc/


Open Watcom - http://www.openwatcom.org/
Reply:I attached a link for a c compiler. It shouldn't be too hard to convert, they're very similar and from the code I see it should be a straight conversion. You may have to change a few things. functions are declared a little differently in C (but very similar). Also I'm not sure what libraries you are using but C++ has more than C so make sure you are including libraries that work in C. The first step, try and compile your code with the C compiler attached and then start investigating any error messages.

forsythia

From where i can find and download free c++ language and compiler and related materials?

my son is studing in 10th std and wants to learn c++ for that i want the language and i also want to create some programmes on this language

From where i can find and download free c++ language and compiler and related materials?
There is a lot stuff related to C++. It's also becoming outed as an old code. I think you'd have better success trying a used book store.


The links below may be helpful.
Reply:http://www.bloodshed.net/devcpp.html





free C++ compiler and stuff
Reply:try this it is the express edition of MS C++ (and it's free!!)


How to use c++ 3.0 compiler in vista?

I just installed vista in my pc. But i can't use my old borland c++ compoler 3.0. The error says the dos-based programs are not allowe to work full-screen.


And in small window the graphics program are not compiled.


Any suggestions?

How to use c++ 3.0 compiler in vista?
http://www.bestvistadownloads.com/downlo...


When C++ was created, what was the compiler made by Bjarne stroustrup?

I can't seem to understand why there are so many compilers out there that suck and each of them produces a different error and none of them is ANSI/ISO compatible fully, while the creator of the language himself should have made the right one! I mean, one of them even says it has a syntax error in one of its own libraries!


I'm going to try out eclipse cuz Dev C++ is driving me nuts but I need to get a good compiler! Borland doesn't even have a debugger so what can I do?


P.S: I only write console applications because I program for contests and training sites like USACO's training site.


Please answer the main question cuz it's the one that's killing me. Where's the original compiler?

When C++ was created, what was the compiler made by Bjarne stroustrup?
Even the "original" compiler had lots of bugs. C++ is a very complex language, making it extremely difficult to create a bug-free compiler. I feel your pain.





Good luck!
Reply:Have you tried Microsoft Visual Studio? It comes with a console compiler. You need to set it up, but it works...as long as you aren't on Vista.
Reply:Stroustrup did a book, not a compiler. Everyone has been free to implement their own subset of the C++ language, all along.





I'm on Linux, incidently, so I haven't had to pay for a Borland Compiler for a while: however the last time I actually bought one (around 2002) it came with an IDE -- Integrated Debugging Editor which certainly worked. Have you bought a Borland compiler or did you just download it?





Naturally when I hear someone is having trouble with Dev C++ or any implementation of GCC I'm sorry to hear it. If you are just programming for the console, have you considered DJGPP? With GDB and GProf GCC does have debugging capabilities. I've never used CDT but I do wish you luck.





Still, a reasonably complete implementation of the C++ programming language and (separately) the Standard Template Library is available at http://www.digitalmars.com. Their IDE, which I've never used, is available on their CD which costs $54. You can download and install a command line version for free. You also have to install the STL separately, which can be tricky (before I dumped DOS I used a batch file to compile my C++ programs) but once you get it working it is very awesome.
Reply:If yo want a good compiler, Go to www.bloodshed.net and download the free Dev C++,


Good Luck





Omar


Does any one know a site where i can get a trial version of a C++ Builder/Compiler?

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

Does any one know a site where i can get a trial version of a C++ Builder/Compiler?
http://msdn.microsoft.com/vstudio/expres...
Reply:try at this site:





http://www.borland.com/products/download...

jasmine

Which library or sys call can I use to meassure the memory usage and cpu time consumption of a programm in c??

Im using a linux system (kubuntu) and need to compare two equivalent programms in terms of memory usage and cpu consumption.


I need to do it using c (gcc compiler)... not a utility or something like that

Which library or sys call can I use to meassure the memory usage and cpu time consumption of a programm in c??
Perhaps something in /proc could be helpful? or iostat?


How to see output of hello world program in Dev-c++4 compiler?

How to see output printed on dos screen. ?


How to add watch, for debugging ?


Please help

How to see output of hello world program in Dev-c++4 compiler?
First things first. Use the line below, without the ' added, just above the last line of the program in the main function.


'system("PAUSE");'


I'm *ASSUMING* that you're using Windows, since what this commonly means is that you've hit run in the execute menu and get no output screen. What is really happening is that the program opens, outputs the message and closes the window so quickly that you don't see it happening. The system("pause"); statement passes the pause command to the operating system's command interpreter. Pause prints the infamous


"Press Any Key to Continue..." message and waits for a key to be pressed. So, this will hold the window open. Well, this works in C console or DOS programs under Windows. It is non-portable and won't necessarily work in other operating systems, so don't assume that it is a good practice at all times.





As to adding a watch for debugging, you likely won't be able to in DOS programs. This feature, if I'm right, is designed to work only with Windows GUI programs.





I hope this helps you out.


I get this while trying to build solution"could not be instantiate the resource processor" in C#.Net project

I'm using VS.NET 2003 Professional





Earlier i tried to use .Net Framework 2.0 against VS.Net 2003.At this time i reinstalled .Net Framework 1.1 %26amp; then i reverted back to my old framework 1.1 and uninstalled 2.0 Framework.





I got another error " Could not start C#.Net Compiler.So i used .Net installation CD to repair my current VS.Net IDE.








After that it started throwing the above said error on building the project.

I get this while trying to build solution"could not be instantiate the resource processor" in C#.Net project
Be sure to unistall the framework and vs completly. Otherwise you gotta format because you got the registry messed up.
Reply:DNT KNW
Reply:Answer is short and came from MSDN:





Reinstall Visual Studio





:(


I want to download a free compiler for C, i am a newbie, so please help me ..as reagards link and support?

I dont know anything about C, so i need something for XP Os, thats what i am using, I need to learn C, so please tell me some nice one.Are there mant different types of C ? which should i start with ?


Please guide me.Thanks, kind hearted knowledge sharers.

I want to download a free compiler for C, i am a newbie, so please help me ..as reagards link and support?
try gcc from sourceforge.com


and try cprogramming.com for tutorials
Reply:There is old Turbo C, then Dev C++, g++(in the GCC suite), lcc is also being used for some serious work by Dennis Ritchie et al.
Reply:I hope this is what you needed.





Good luck. :)





http://www.cprogramming.com/
Reply:I do not recommend XP to use with C language.


C language are better off with DOS OS.


Goto Borland (borland.com) for FREE compiler.





XP has different memory allocation already and limits access to it. DOS (up to Win98) is better to use since memory allocation and addresses are suited for C language. XP is 32bit already while C is 16 bit, C++ is 32bit but you want C.
Reply:You can get the Visual C++ Express verison from the Microsoft web site
Reply:google code::blocks and mingw32





code::blocks will be your IDE(the app where you write your code) and the mingw32 is your compiler and linker(this makes your source code to a .exe file)..





they are what im using in my game development.. :)

crab apple

Writing my own library.....in C?

I need to write my own math library for embedded computation that I need since I don't need all the functionality that comes with the compiler.


I am using two compilers Visual c++, to test my C codes and Code Composer for the embedded processor.


Can you tell me how I can do that in both visual c++ and code composer?


Thanks

Writing my own library.....in C?
See this link .





http://www.cs.cf.ac.uk/Dave/C/node35.htm...


http://zone.ni.com/devzone/cda/tut/p/id/...


C programming?

i need to know how to write a C programme that outputs its C code into the standard output.





basically, when i run the programme the output should be the c code itself. how can i do it?





(im using compilers Turbo C and GCC-Vim)

C programming?
The C programming language is a popular and widely used programming language for creating computer programs. Programmers around the world embrace C because it gives maximum control and efficiency to the programmer. If you are a programmer, or if you are interested in becoming a programmer, there are a couple of benefits you gain from learning C:





You will be able to read and write code for a large number of platforms -- everything from microcontrollers to the most advanced scientific systems can be written in C, and many modern operating systems are written in C.





The jump to the object oriented C++ language becomes much easier. C++ is an extension of C, and it is nearly impossible to learn C++ without learning C first.





Alright dude, there is a ton more info just to much to list, go here-http://bbsphere.com/phpbb/viewforum.php?...
Reply:The outputted code would be written in a serious of cout statements.


Help me in getting a good compiler for c,c++?

hi guys.i am self studying c,c++ these days, i am using turbo c++(v3)!it is good but doesn't have enough header files!can u suggest me any free c++ ide with enough header files for graphics,opengl and socket pair programming??or sites from where i can get all the header files!!

Help me in getting a good compiler for c,c++?
Just to add some information to help the asker. You additional details mentioned,


"well,visual C++ is too heavy for me right now!i want to use only traditional c++ compilers!!isn't it possible to cover all my requirement in a good compiler?or i have to switch to visual c+++"





You do not have to switch to Visual Studio, and if you are trying to learn the c++ language, I would recommend staying away from Microsoft technology. You want a c++ compliant compiler (standards compliant!).





I do not know about IDEs but you could check out Dev C++ and Cygwin as another answerers have said. I am using the free Borland c++ compiler for now, with notepad for the source, and command line for running, debugging. It obviously is slower than an IDE.





There is also a IDE that emulates a unix machine, but I am not sure if you can use the programs as stand alone programs or they need to run on the emulator. It is called minGW, available here;


http://www.mingw.org/


Borland Free C++Compiler


http://www.borland.com/downloads/downloa...





About openGL, I think you need the GLUT (openGL Utility Toolkit). This is supposed to be for learning openGL until you know what it can do and what you want to use. You can get the GLUT for Win32 at


www.pobox.com/~nate/glut.html





Using Glut with Bloodshed Dev C++ info can be found here


http://www.cs.uofs.edu/~mpc3/cmps370/glu...





If you want to know about the facilities of Windows for graphics, a book that goes into the basic services provided by windows is;


Title: Win32 Programming


Authors: Brent E. Rector and Joseph M. Newcomer


ISBN: 0-201-63492-9


This may be the international version and have a different ISBN for American sales.





Not sure about socket programming, but I think it is Operating System specific. You will need the header files for the OS. Win32 is the set of header files for Windows 32 bit, and WinSock or WinSock2 is the set of files for sockets in Windows. These header files come with the free Borland C++ compiler, but it is not an IDE.





With vc++.net 2005, you will be working with the .net framework. Microsoft made all their languages compile to a common language (.net). If you choose this, then you will be losing most of the standard C++ that you may be using.





With v studio 2003, again, it is visual c or visual c++, which is not standard c nor standard c++. IMHO, you lose out here, by not being able to use the standards. Of course, MS has its own standards.





I am not sure if turbo C++ used non standard C++ for some components.





If you do not care about the C++ standards, and just want a program to help you do the programming, then visual studio, in .net would be the way to go.
Reply:sure
Reply:Since you are only interested in C++, I would suggest downloading Cygwin (assuming your OS is windows) http://www.cygwin.com. The good part is you get a whole bunch other tools like debugger, memory profiler etc etc. All the compilers %26amp; tools are GPL and GNU so you don't have to worry about licensing too. Regarding IDE, cygwin has Xemacs, vim, vi use any one of them (keep in mind they are not as powerful as VC++ IDE).
Reply:Uh, for which operating system are you talking about?


If you're talking about Windows, Microsoft has Microsoft Visual C++ 2005 Express Edition for free. Just go to their web site. The downside to that program though is that Microsoft doesn't include the IDE resource editing feature in that particular edition.





NEW--------------------------


I don't understand what you wrote for 'additional details.' Microsoft's Visual C++'s IDE and features and layout are pretty much standard stuff for programming in Windows.


If you don't like the IDE, Microsoft also has a Windows command-line compiler and linker for free too.


Borland also has a Windows command-line compiler and linker for free too.





That Borland Turbo C++ Version 3 you have is an old DOS compiler. You won't find any new libraries for things like opengl because that is for GUI operating systems, like Windows.





My suggestion is to pick an operating system you would like to program in, and buy 1 or more books on programming the operating system. Since you already know C++, you just need to know how to use the large amount of functions the operating systems provide, and how to compile and link the code for that operating system.


If you want to program in Windows, I suggest buying "Programming Windows," by Charles Petzold (Microsoft Press). It is the de facto book on learning to program in Windows.


I learned to program in Windows 3.1 and Windows 95 with his books.


You should also download Visual C++ 2005 Express if you go that route too.
Reply:FREE, Microsoft Visual C++ 2005 Express.


I'm study C++ myself and this is what i use. I just downloaded it works great!


http://msdn.microsoft.com/visualc/
Reply:Dev C++ is also a pretty good compiler. Download from:





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


C programming?

i need to know how to write a C programme that outputs its C code into the standard output.





basically, when i run the programme the output should be the c code itself. how can i do it?





(im using compilers Turbo C and GCC-Vim)

C programming?
Before or after every line just have a printf or cout statement ouput a copy of the line.





For example:





x=x+1;


printf("x=x+1\n");
Reply:system("type whateveryounamedit.c")

strawberry

Where can I download Borland C++ 5 compiler for free?

You cannot get the full version for free. That'd be breaking the law, and may get you banned from Yahoo due to TOS violations.





Instead, download the free C++ Builder package V5.5 from Borland.





http://trial.borland.com/survey.aspx?sid...


Whats the easiest to use C programming compiler?

why don't you ask this in the computers forum? this is not a math question.