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
 
 
#include<stdio.h>
#include<conio.h>

int main()
{
    int a[20],n,i,max=0;  // declared the array a with size  20
    clrscr();

    printf(\"\\n Enter  the number of elements for 1-D array : \");
    scanf(\"%d\",&n);

    for(i=0;i<n;i++)
    {
        printf(\"\\n Enter element [%d] : \",i+1);
        scanf(\"%d\",&a[i]);
    }
    for(i=0;i<n;i++)
    {
        if(max<a[i])
            max=a[i];
    }

    printf(\"\\n Greatest element from above array inserted is : %d\",max);

    getch();

    return 0;
}


Output:

Enter  the number of elements for 1-D array : 5

Enter element [1] : 1
Enter element [2] : 8
Enter element [3] : 2
Enter element [4] : 5
Enter element [5] : 9

Greatest element from above array inserted is: 9

    Related Post:
  1. Program of matrix transpose and matrix multiplication

  2. Program that accepts characters in lower case, stores them in an array and prints them in the upper-case and vice - versa

  3. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES. INPUT STEPS FROM KEYBOARD. SUM=X-X3/3!+X5/5!-X7/7!+...(TAKE VALUE OF X ALSO).

  4. PROGRAM TO FIND VALUE OF X1 AND X2 WHICH IS SOLUTION OF LINEAR EQUATION

  5. Program to multiply matrix (10 x 10) with a vector using Indirect Scheduling

  6. Program to calculate product or multiplication of two matrices

  7. PROGRAM FOR HISTOGRAM FOR INDIVIDUAL CELL OF HISTOGRAM THERE ARE SEPARATE LOCK

  8. PROGRAM TO READ NUMBERS, N1 AND N2 ARE INTERCHANGE WITHOUT USING EXTRA VARIABLES.N1=10, N2=20 THEN O/P IS N1=20, N2=10 USING MULTIPLICATION, DIVISION

  9. Program to print address of a variable using & operator

  10. PROGRAM TO CHECK GIVEN NUMBER IS ODD OR EVEN

  11. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES. INPUT STEPS FROM KEYBORD SUM =12-32+52-72+.....

  12. Program to add numbers using function

  13. Program to create a singly linked list of numbers using threads

  14. Program on deque that implements a linked list

  15. Program to interchange the Small and Captial Letters on the screen after every 5th second and Unload the TSR on a Delete Key Press

  16. Program to multiply two nXn matrix using indirect scheduling in two dimensional matrix

  17. PROGRAM TO CREATE DYNAMIC STACK

  18. Program to find length of a string

  19. PROGRAM TO READ A LINE OF TEXT FROM TERMINAL

  20. Straight-line method of computing the yearly depreciation of the value of an item i.e DEPREATION = (PURCHASE VALUE - SALVAGE VALUE) / YEAR OF SERVICE

 
 
Didn't find what you were looking for? Find more on Program to find greatest number from one dimensional array