Thursday, 31 January 2013

Understanding an RDBMS


Every database is composed of one or more tables.
These tables, which structure data into rows and columns, are what lend organization to the data.
Here’s an example of what a typical table looks like:



As you can see, a table divides data into rows, with a new entry (or record) on every row. If you flip back to my original database-as-filing-cabinet analogy, you’ll see that every file in the cabinet corresponds to one row in the table.

Sunday, 27 January 2013

Loops in C

 This is an attempt at explaining the loops in C .It is not complete, just the basics.
C Programming
C Programming

Loop is  a construct which execute a set of statements certain number of times.
 It is simply a way to execute the statement(s) as many as times you want. 
Suppose you have to print your name on screen? We all know how we can do this.

void main()
   printf(" YOUR NAME");
getch();
The above program simply print ypur name on the screen. Now What will you do when you ask to print your name 5 times? YES,you can write four more printf statement in above program But  when its 50 times or 100 time then? Who have dare to write printf statement that much time in his program,  

For  we have Loops 
 void main()
{ int i;
for(i=1;i<=100;i++)
   printf(" YOUR NAME");
getch();
This program is able to write your name 100 time.





Types of loop statement:
1.for statement:
the syntax is-
for ( initial; condition; increment )
  {statement(s);
  }

 When a compiler encountered with  for statement , the following events occur:
1. The expression initial is evaluated. initial is usually an assignment statement that sets a variable
      to a particular value.
2. The expression condition is evaluated. condition is typically a relational expression.
3. If condition evaluates to false, the for statement terminates, and execution  passes to the first statement following statement.
4. If condition evaluates to true , the  statement(s)  are executed.
5. The expression increment is evaluated, and execution returns to step .2

example:-
printint the multiple of 2

#include<sdtio.h>
#include<conio.h>
void main()
{  int i;
for(i=1;i<=10;i++)
{  printf("%d\n" ,2*i);
}
getch();
}

2.while statement:-
syntax
while (condition)
{ statements(s)
}
the following steps are evaluated
1. The expression condition is evaluated.
2. If condition is false, the while statement terminates, and execution
passes to the first statement following statement.
3. If condition is true the  statement(s) in  are executed.
4. Execution returns to step 1.

same program using while loop
#include<sdtio.h>
#include<conio.h>
void main()
{ int i;
while(i<=10)
   printf("%d\n" ,2*i);
       i=i+1;
}
getch();
}

3.do while Statement:-
syntax:
do
statement
while (condition);

1. The statements in statement are executed.
2. condition is evaluated. If it's true, execution returns to step 1. If it's false, the loop terminates
example:

#include<sdtio.h>
#include<conio.h>
void main()
{ int i=0;
do (
   printf("%d\n" ,2*i);
       i=i+1;
}while(i<10)
getch();

}
C - Overview
C - Basic Syntax
C - Data Types
C - Variables
C - Constants
C - Storage Classes
C - Operators
C - Decision Making
C - Loops
C - Functions
C - Scope Rules
C - Arrays
C - Pointers
C - Strings
C - Structures
C - Unions
C - Bit Fields
C - Typedef
C - Input & Output
C - File I/O
C - Preprocessors
C - Header Files
C - Type Casting
C - Error Handling
C - Recursion
C - Variable Arguments
C - Memory Management
C - Command Line Arguments

Wednesday, 23 January 2013

Batch File Programming

  Batch file programming is the native programming offered by the Microsoft Windows Operating
 System. Batch files consist a set of commands (i..e MS Dos commands) ,which interpreted line by
 line when we  execute the file. 
Batch file is really helpful in automating tedious tasks   and for maintaining system logs or clearing
 unwanted  craps from your computer and even for creating a batch VIRUS.

How to create a Batch Program:

 Like any other  programing languages, lets start our first program with the ‘Hello World’ program.
 For this first you have to open any of your text editor.
 1-let open notepad and type  the commands..
    @echo off
     Echo Hello World
     pause


2. Now save the file with any name , but the that  extension with .bat, in this case I am saving
 this file as ‘first.bat’.

3. Just double click to execute the batch file that you have created . And the output looks like
                                     
 Now lets understands what we have done above.
         
 The @echo off command is used to hide the prompt sign i.e c:\> which is default in  MS Dos .
 Echo command is used to display the message on screen ,here we print "Hello World " and 
pause command will hold the screen until you any key .This is just like getch() statement in C.

Tuesday, 8 January 2013

C language


'C' is a well known programming language which was developed by Dennis  Ritchie  in 1972 in  AT&T Bell Labs. This programming language was influenced by B , BCPL ,  ALGOL, and some other programming languages.
C language is structured & procedural based programming language .Many programming language which we are using today were influenced from  'C'.examples of such languages are C++ ,D ,Objective C,Go,etc.

This language includes variables,constants,arithmetic ,control  flow,functions and  input & output .

Monday, 7 January 2013

Practice programming & compare your coding

                                             Practice programming & compare your coding on