Posts

Lesson 2 : First C Program

Now Friends, that you are well equipped with the knowledge of keywords and identifiers, let us write a simple program to calculate the sum of two numbers entered by user. #include<stdio.h> void main() {  int a,b,sum;  printf("Enter two numbers");  scanf("%d %d " ,&a ,&b);  sum=a+b;  printf("Sum = %d "); } this program will have a output like this Enter two numbers 10 20 Sum = 30 Here in this program you can see few things, let us look at them line by line. 1. The first line contains "#include<stdio.h>" this is known as preprocessor. It says the compiler to include library file "stdio.h". ".h" represents a header file. This file contains the details for functions like printf, scanf and other input-output functions. 2. The 2nd line have void main() this is where our compiler starts reading the program. Every C program must contain one and only one main() function because this is were the compiler starts readi...

Lesson 1 : Getting Started With C

Now all you guys know why you should be starting with C and then Getting to C++ lets begin our 1st lesson for C. We all know very well that C is a language and a language have some alphabets, combination of which results in words and then several words together create sentences. So , there is the case with the C, C has got keywords , and identifiers , combination of which results in the statement and if the statement is correct then C executes it without error. You guys now might be wondering that what are keywords and identifiers, don't worry i'll tell you what they are and how to use them. Keywords are predefined C words that have already defined meaning like int , which means a integer is being defined. There are many Keywords that you will get to know as we will proceed. Now, Identifiers , are those words which are defined by the programmer, that is, you to store some values. It could be any word other than keywords. There are few rules for defining Identifiers that you sho...

Introduction To C

B efore we can start writing serious programs in C, it would be interesting to know what it is C, how it came into existence and how it compares with other languages. This post briefly summarizes these issues. Four important aspects of any language are the way it stores data, how it operates on these data, how it performs input and output and how you control the execution sequence of instructions in a program . I would like to discuss the first three of these building blocks in this post. What is C? C is a programming language developed at Bell Laboratories AT & T U.S. in 1972. It was designed and written by a man named Dennis Ritchie. In the seventies C began to replace the language of the era known as PL / I, ALGOL, etc. No one pushed C. There was no "official" Bell Labs, language. Therefore, without any advertising and its reputation spread C user group grew. Ritchie seems to have been quite surprised that many programmers prefer C to the ancient languages ??such as FO...

Introduction To Blog

Hello Dear Friends, I have taken an initiative to write this blog for all of the novice programmers who wants to learn C and C++ for free and with all the details that other such websites do not provide. I will be providing you with all the details for C programming and also with the exercise that will help you get better. There will be a lesson a week, means i will be increasing the matter every week. So if you are paying or going to coaching for learning this language then you won't be needing to do so. I will be beginning my classes from  21 November, with the introduction to C . Hang on here. If you are willing to ask any question related to any topic that you have learned you are free to do so by posting comments on the blog with you emails, i will get back to you there. 5JY9JVACZ66W