Sunday, February 13, 2011

Input/Output Function

Input/Output Function

stdin
stdin
stdout
stderr
The input/output function are stream of characters,then character based input and output fucntion
getc()
putc()
getchar()
putchar()

this are all character based input and output functions, that is u need to some of the texts("strings") means u need to hatch these functions.


This is the program for accept/ display the characters

#include<stdio.h>
main()
{
char alph;
alph=getc(stdin);
fflush(stdin);
putc(alph,stdout);
}
this session to be continued..

Saturday, February 12, 2011

Let We C Session-3 [Structures]

Structures:

Function: 

  • Single level function
  • Multilevel Function
Single level function:

Sample program

main()       \*program start execution right over here,that is the compiler start run from here*\

{               \*start of the program*\

printf("hello"); \*to display the message*\

}                \*end of the program*\

this are all above are preceding functions.
; =>> implies that end of execution statement.
 

Multilevel Function:

Sample Program;

main()
{
printf("hello");
disp_msg();
printf("Welcome to World");
 }
disp_msg();
{
prinf("MR.XXX");
}

disp_msg(); =>> Programmer-defined function that can be independently called by other function
( )                =>>This is implies that passing values to the function,whether any receiving function is excepting any parameter.

Next session is Input/Output functions....

Friday, February 11, 2011

Let We C Session-2 [Types of Data Structures]

Types of Data Structures:
  • Fundamental Data types.
  • Derived Data types.
Fundamental Data types:                            
  •   Data types at a lowest level.
  •   Base for Other data types.
  •   Machine depend storage requirement. 
char                    deaf

int                       22223


Float                   324.242

Derived Data types:
  
Little same as function data type.

Declaration done at beginning.
  •   short int 
  •   long int  
  •   double int   
  •   define data                                                                                                                

 short => data type

 long => variables


Strings:


Syntax
 
char(variable) [(number of bytes)];

Example:
char string  10;       




Next Session is Structures.........

Let We C


C language


The Language called 'B 'was first discovered by Ken Thompson.'B language' was based on Interpreter and process speed is low .After years ago solution made for that problem that was done by Dennis Richard,the language called 'C'.It was compiler based language and it is second and third generation language.


B       Ken Thomson            Interpreter Based       Slow Process Speed

C      Dennis Richard           Compiler Based        Fast when compare to 'B'


2nd Generation:  Powerful low level Features.
3nd GenerationLoops and Construction.

 Features of C:


  • Block Structured Language
  • Powerful and Flexible
  • Structured Programming
  • Handful of function  
This are all the most important features of 'C;

  • Pointers
  • Memory Allocation(Static/Dynamic)
  • Recursion(Function Calls itself)
  • Bit Manipulation(Lowest form of storage)

Next session is Types of Data Structures........