Posts

c-programming.......

pointer:- A pointer is a variable that stores the address of another variable. features of pointer:-   pointer is save memory space.  The memory is accessed efficiently with the pointer is dynamically memory is allocated & De-allocated. Execution time with pointer is faster because data is manipulated with the address i.e direct access to memory location. Pointer are used with Data-Structures. *(astric) symbol is used for pointer. Declaration of pointer:- A pointer provide access to a variable by using the address of that variable. A pointer variable is therefore a variables that stores the address of another variable.         int *p; syntax:-       Data-Type *pointer name; Example:-      int pointer ptr;          #include<stdio.h>    #include<conio.h>     void main()     {     int a= 100;   ...

c- language.

1. function:-     it is a concept of modular programming consisting of instructions to carry out the specific task. in general concept the function after executing returns a single value to function called program. Advantage of function:-       There are following advantages of functions. 1.By using function, we can avoid re-writting, same logic or code again and again in a program. 2.We can call c-functions any number of times in a program and from any place in a program. 3.We can track a large logic c-program easily when, it is divided into multiple function. 4.Reuseablity is the main benifit of function. function is divided into two sub category:- 1. library function. 2. user defined function.

c-language.....

1. write a program transpose matrices. ans:- #include <stdio.h>          #include <conio.h>           void main()           {            int mat[3][3], trans[3][3], row, col;             clrscr();           for(row=0;row<3;row++)          {           for(col=0;col<3;col++)          {         printf("input the data")         scanf("%d", &mat[row] [col]);    } }        for(row=0;row<3;row++)        {       for(col=0;col<3;col++)        {          trans[row][col]= mat[col][row];     }         for(row=0;row<3;row++)     ...

c- programming in 1-D array....

1. write a program in c to input to element in an array display the largest and smallest element by using 1-D array. ans:- #include <stdio.h>         #include <conio.h>          void main()         {           int arr[10],i, large=0, small=0;            clrscr();          printf("input ten elements");          for(i=0;i<10;i++)         {           scanf("%d", &arr[i]);          if(arr[i]>0)          large++;          else            if(arr[i]<0)              small++;     printf("\n largest=%d, \n smallest=%d", largest, smallest);            getch();  ...

c- programming.....

1. write a program in c to input five elements by display them by using the concept 1-D array. ans:-  #inculde <stdio.h>          #inculde <conio.h>           void main()           {           int arr[5], index;           clrscr();          printf("input five elements");          for(index=o;index<5;index++)         {           scanf("%d", &arr[i]);          for(index=o;index<5;index++)          {           printf("%d", arr[i]);   }           getch();                     } 2.write a program in c to input the five element and display their sum and average by using the concep...

#2 EASY WAY TO LEARN C PROGRAMMING ||JLC HAJIPUR

Image