Posts Tagged ‘C/C++’

An overview of Computer Programming !!

August 15, 2010

ABC to Convert Integers to Strings in C++

June 23, 2009

I was solving a problem in TopCoder. It required a conversion of  integer to a string. This is simple in Java but a little complicated in C++. So, I am jotting down here some of the link that helped me. I will also try to make a mention of the problem associated with them. The [...]

How to use scanf to read Strings with Spaces ?

June 10, 2009

I knew this for two years now, but it dint strike me before to put it up in the blog; don’t know why ? Its easy and simple, I don’t think I need to explain. Only the syntax needs to be remembered. scanf(” %[^\n]s”,a); May be you get a question in your mind. What does [...]

How to set precision in C++

June 1, 2009

In C++, you can use the ‘precision’ function to set the precision of the output. The function ‘precision’ is present in the header file ‘iostream.h’. The following, cout.precision(n); will have totally print ‘n’ d igits in the output with the decimal point in between(say ‘x’ before the decimal and ‘n-x’ after the decimal. The value [...]

How to create header files in C/C++ ?

February 25, 2009

First of all, does creating a header file useful at all ? If yes how ? It obviously is or else we wouldn’t have had soemthing called a ‘header files’. Next, can we create our own header files ? Yes, you can. It is pretty simple and its going to make your program simple and [...]

What do you mean by a translation unit in C ?

February 20, 2009

Translation unit is a set of source files as seen by the compiler.

Follow

Get every new post delivered to your Inbox.

Join 141 other followers