C Programming Tutorial

 
 
 

Advanced Programming

Array

One dimensional array Two dimensional Array Two dimensional array pointers Array of pointers Print array Print Array - for loop Print array in reverse Print address array - for loop Multidimentional array - function Print address array - pointers Print reverse string of array Print array ascii value-without atoi Character array - upper case Multiplication table - 2D array Passing array to function Max or greatest value in array Merge sorted array Array of structure Array of pointers to string Array within a structure

String Programs

Copy string Substring of string String concatination Vowel in string Swap char in string Palindrome string Rotate string Bubble sort of strings Sorting of words Encode decode string Compress string

File Programs

Read write in 2 files Add,edit,delete,search in file Add,search using structure Append in file Merge file Count word,line,char in file Count record - struct fread() example fwrite() example fopen() example fclose() example fscanf() and fprintf() fseek() example Error handling in file op Find odd,even num Odd even numbers in file Max, min age in class Random numbers file Preprocessor in 2 files Encode decode in file

Bios Programming

biosequip( ) - sys confi biosdisk( ) - partition tbl info Pc type-bios data area File allocation table Telephone directory

TSR Programming

Interchange letters Interchange letters on screen Unload TSR on key press-keyboard Unload TSR - timer interrupt Activate, deactivate TSR Print alphabet from printer Repeat key press Keep caps on Make ctrl, alt key pressed

Interrupt Programming

Restart computer Conventional memory of sys Save IVT in file Print string-interrupt 21h Read char-interrupt 21h Read char with echo-interrupt 21h Delete file-interrupt 21h Delete directory-interrupt 21h Get set system date Show system configuration Search, delete file in dir Display multiple file in dir

Mouse Programming

Text mode mouse handling Graphics mode mouse handling Double click of mouse
 
 
 #define     MAXGIRLS     4                                  
   #define     MAXITEMS     3                                  
   main()                                                      
   {                                                           
       int   value[MAXGIRLS][MAXITEMS];                        
       int   girl_total[MAXGIRLS] , item_total[MAXITEMS];      
       int   i, j, grand_total;                                

   /*.......READING OF VALUES AND COMPUTING girl_total ...*/   

       printf(\"Input data\\n\");                                
       printf(\"Enter values, one at a time, row-wise\\n\\n\");    

       for( i = 0 ; i < MAXGIRLS ; i++ )                       
       {                                                       
          girl_total[i] = 0;                                   
          for( j = 0 ; j < MAXITEMS ; j++ )                    
          {                                                    
             scanf(\"%d\", &value[i][j]);                        
             girl_total[i] = girl_total[i] + value[i][j];      
          }                                                    
       }                                                       
  /*.......COMPUTING item_total..........................*/   

       for( j = 0 ; j < MAXITEMS ; j++ )                       
       {                                                       
          item_total[j] = 0;                                   
          for( i =0 ; i < MAXGIRLS ; i++ )                     
             item_total[j] = item_total[j] + value[i][j];      
       }                                                       


/*.......COMPUTING grand_total.........................*/   

       grand_total = 0;                                        
       for( i =0 ; i < MAXGIRLS ; i++ )                        
          grand_total = grand_total + girl_total[i];           

/* .......PRINTING OF RESULTS...........................*/   

       printf(\"\\n GIRLS TOTALS\\n\\n\");                          
       for( i = 0 ; i < MAXGIRLS ; i++ )                       
          printf(\"Salesgirl[%d] = %d\\n\", i+1, girl_total[i] ); 
       printf(\"\\n ITEM  TOTALS\\n\\n\");                          
       for( j = 0 ; j < MAXITEMS ; j++ )                       
          printf(\"Item[%d] = %d\\n\", j+1 , item_total[j] );     
       printf(\"\\nGrand Total = %d\\n\", grand_total);            
   }                                                           

Output                                                      

   Input data                                                  
   Enter values, one at a time, row_wise                       

   310  257  365                                               
   210  190  325                                               
   405  235  240                                               
   260  300  380                                                                                                      

   GIRLS TOTALS                                               

   Salesgirl[1] = 950                                          
   Salesgirl[2] = 725                                          
   Salesgirl[3] = 880                                          
   Salesgirl[4] = 940                                          

    ITEM  TOTALS                                               

   Item[1] = 1185                                              
   Item[2] = 1000                                              
   Item[3] = 1310                                              

   Grand Total = 3495                                          

    Related Post:
  1. PROGRAM TO FIND THE MEAN OF USER DEFINED NUMBER OF ARRAY ELEMENTS

  2. Program to compress given string

  3. Program of Inserting a number in a sorted linked list

  4. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES.INPUT STEPS FROM KEYBORD.SUM=e1+e2+e3+...(TAKE EXP FUNCTION FROM MATH.H)

  5. C Program to Find out when will be My Death Date

  6. Program of FIXED POINT METHOD OF NON LINEAR EQUATION

  7. Program to print triangle of numbers as shown in description

  8. PROGRAM TO READ THE PRICE OF AN ITEM IN DECIMAL FORM LIKE (10) AND PRINT THE OUTPUT IN PAISE LIKE(1000)

  9. Program to read a character from KeyBoard using Interrupt 21h

  10. Program that uses while loop and calculate sum of every third integer number with i=2 (i.e. sum = 2+5+8+11+.) for values of I that is less than 100

  11. Program to simulate process synchronization, call wait function so that the executing process gets blocked and then print their process ids

  12. Program to print triangle of numbers and take number value from user

  13. Program to find first n prime numbers

  14. Illustration of subscripted structure variables , ARRAYS OF STRUCTURES

  15. Program to print entered word in an alphabetical order

  16. program that takes a number from user and calculates its logarithm value to the base 10 and e, exponentiation, sin value, cosine value and square root

  17. SOLVE FOLLOWING EXPRESSION PARALLELY. X[k] = U[k] + r * ( Z[k] + r * U[k]) + t * ( U[k+3] + r * ( U[k+2] + r * U[k+1] ) )+ t * t * ( U[k+6] + r * ( U[

  18. PROGRAM TO READ THE PRICE OF AN ITEM IN DECIMAL FORM LIKE (10) AND PRINT THE OUTPUT IN PAISE LIKE(1000)

  19. Program to find ascii value of entered text or word for each character

  20. Reading and writing of alphabets in reverse case

 
 
Didn't find what you were looking for? Find more on Illustration of two-dimensional arrays.