Tuesday, July 14, 2009

C Programming Language: How do you truncate?

Whenever I try to run the the code through the complier with trunc(x), I get this error message:





Undefined first referenced


symbol in file


trunc /var/tmp//ccExIysK.o


ld: fatal: Symbol referencing errors. No output written to a.out


collect2: ld returned 1 exit status





and whenever I try to run the code through complier with truncf(x), I get this error message:





Undefined first referenced


symbol in file


truncf /var/tmp//cc3cRAJq.o


ld: fatal: Symbol referencing errors. No output written to a.out


collect2: ld returned 1 exit status





How do you truncate in the C programming language?

C Programming Language: How do you truncate?
make sure that u r using the right header file


write:


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


at the top of ur code

periwinkle

C programming practical books?

give me alist of c programming books

C programming practical books?
"Sam's Teach Yourself C In 24 Hours," Tony Zhang %26amp; John Southmayd.
Reply:yashwant kantekar-practical





balaguruswamy-theory
Reply:If you are in India you can use Kanitkars "Let Us C". This book is good for Starters as well as expert programers. For programing codes you can visit my blog http://codesbyshariq.blogspot.com
Reply:Check out http://www.amazon.com/
Reply:You could be a little more polite about it for starters.





Every C programmer should have or probably has this book it is written by one of the people who created C:








http://en.wikipedia.org/wiki/The_C_Progr...
Reply:balaguruswamy
Reply:Well, Sams "teach yourself in 24 hours" series always seems to work out well.





I personally learned from a book by Deitel:


http://vig.prenhall.com/catalog/academic...





It's designed for courses in programming, so it has a lot of excercises you can try.


Online guide to C or C++ Programming?

what are some good sites for learning C or C++ computer programming.





i am trying to learn how to write programs, but am lost on all these search engines with nothing coming up...help please.

Online guide to C or C++ Programming?
http://www.cprogramming.com/tutorial.htm...


http://www.cyberdiem.com/vin/learn.html
Reply:http://www.cppgameprogramming.com ---%26gt; C++ and Game Programing


http://www.mycplus.com/


http://www.gamedev.net ----%26gt; Game Programming
Reply:If you're doing visual C++, you may find this site helpful.





http://msdn2.microsoft.com/en-us/library...
Reply:Are you sure C or C++ is the best choice for you? There are free interpreted scripting languages which are much better for mastering programming technique, and which have important advanced features like object orientation and so on. Since they are interpreted and not pre-compiled, they can be used interactively which is a great way to explore the language and figure out a rough approach to a problem.





Python is a great example of one of these advanced interpreted scripting languages. You probably already have it on your computer -- type "python" at a terminal prompt. If something happens, Python is installed; type control-D to exit. One great strength of Python is its ability to link to C++ code, which allows you to program fast blocks of code for those (rare) instances where native Python is too slow; you can continue using all the old code that is not causing a performance hit.


Anybody genius in c++ programming .This question is specially to them........?

Describe about c-strings in c++ programming .mention its functions


and also advantages of using these strings while programming....

Anybody genius in c++ programming .This question is specially to them........?
Hope this will help u


http://www.cprogramming.com/tutorial/les...
Reply:What are c-strings?
Reply:You don't need to be a genius to answer that.





Don't be so specific like that - give _everyone_ an opportunity to help you. Otherwise it's called "looking a gift horse in the mouth".





Rawlyn.
Reply:yes indeed


C programming book?

any one knows , where i can get softcopy of Programming in ANSI C - E Balagurusamy

C programming book?
Dennis Ritche, programming in C.


This is best book I have ever seen, for ASCI -C programming.





LetsC is the second option that I'll recommend.
Reply:Balaguruswamy's book is very popular for C learners(beginers) try it out from any Engineering book store. Or read Let us C by Yashwant Kanetkar
Reply:try bookmooch.com I am using it for trading books with people

night blooming cereus

How do I practice C programming at home?

Hi,





I'm taking a basic programming class since I'm an electrical engineering undergrad. I have programming classes every Monday and Wednesday, however, for the type of learner that I am, I need to do a lot of practice. I asked my professor how I could work at home, but instead, he suggested that I just come into the lab to work my problems out. I live pretty far from school so I don't really want to do that. I mean, it's regular C language, so I'm positive I could do it on my laptop running XP media center '05.





I don't know the info you need to answer the question, but here are a few facts.





-We're using the OS Red Hat Linux


-We use text editor to program


-We use something called terminal that looks a lot like MS-DOS





I've read that I can use notepad and MS-DOS to do the same things, but I couldn't figure it out. I hope I gave enough info. I'll add on more if you do need to know some extra.

How do I practice C programming at home?
In linux


vi a.c


write code


type gcc a.c


run a.out


in windows


download turbo c compiler and use it to compile the code.
Reply:The Link below tells you how to write an ANSI C program using C++ in 2005 Visual Studio.
Reply:There will be some differences in the libraries available to a Windows Programmer and a Unix/Linux programmer. For example, Windows does not have a "fork()" function (as far as I know). Unix/Linux does not have a conio.h library.





I would suggest trying an install of Linux on your home computer as a dual boot system. While there are very good C/C++ compilers available for Windows, Unix/Linux is pretty much the standard for techies. If you're going into engineering, you will probably need to learn Unix in one form or another.





Also, Linux and Unix are pretty good about following standards. The Gnu compiler is pretty universal on all Unix like systems, like Linux and Mac OSX.





Any Linux distro will do. For a newbie, try using Ubuntu or Kubuntu. You will need to select development packages during the installation. You can use a fancy IDE like eclipse or Kdevelop. However I personally prefer to use EMACS while some folks I know prefer to use VI. In any case, these editors are geared more for programmers.





The Idea of using Notepad to edit code sounds excruciating. Notepad is not meant for programming. It doesn't have a C mode that automatically indents your code for readability. It doesn't have macros that make programming easier. It is simply a very bare bones editor.





Another option is to download the Cygwin toolkit. Cygwin is a port of the Gnu compiler for Windows and it includes a bunch of standard Unix libraries ported to Windows. It also includes a bash shell (the thing that's like the MSDOS prompt).





Learn the shell. Bash is much more powerful than the DOS shell and if you go into engineering and programming, you'll find it handy to know. I don't know how Windows programmers are able to program without it.





For an editor, I personally recommend EMACS. It has been ported to Windows. But for any really large projects, you'll want an IDE like eclipse.





Whatever you do, do NOT go out and buy Microsoft Visual C++ or C#. They are NOT standard and are not easily ported to Unix (where your schoolwork will be graded). As I said, as an engineer, Unix will probably be a requirement.
Reply:All you need to write C at home is a text editor and a compiler. The text editor can be as simple as notepad or as slick as the Eclipse integrated development environment. For a compiler, google 'c compiler' and you'll get a whole list of freebies.





Something else you might be interested in would be Microsoft's Visual C# (pronounced "C Sharp"). You can download Visual C# Express for free from their website, which will include a compiler and -- in my opinion -- the slickest of all integrated development environments, Microsoft Visual Studios 2008. From there, you can build Windows applications, web applications, XAML browser applications, web services -- all kinds of stuff.





Best of luck.








Edit -- to "Mike D"...





I find it hilarious that a professional programmer -- who uses EMACS, no less --can't figure out know how a Windows programmer can function without BAsh .





See, to me, one look at BAsh and emacs makes me have flashbacks from when I was programming Pascal on Unisys ICON machines in a QNX environment back in high school... Kinda makes me want to put a gun in my mouth, frankly.





I mean, say what you will about Microsoft, but Visual Studio sets the gold standard for integrated development. Open your mind, give it a tumble, and see what it's like writing code in the 21st century. You might just like it.


In c programming using fibonacci sequence, if n=2 and sequence=5, can you display "2 2 4 6 10" using C code?

C programming only pls.

In c programming using fibonacci sequence, if n=2 and sequence=5, can you display "2 2 4 6 10" using C code?
google it, something like:





fib(n){if(n==1||n==o)return 1;else fib(n-1)+fib(n-2);}





Hope that helps