Skip to main content

About Us

 Hello guys,

My name is Ahvi kumar .I am the owner of this site . In this site ,you will be given coding and basic information related to C language .

                                

Comments

Popular posts from this blog

One dimensional array declaration in c language basic of array

One D array **Definition of array** Array can be define as a collection of data object which are stored in consecutive memory location with a common variable name.                                                                                                        or  Array is the collection of similar data types or collection of similar entity stored in contiguous memory location . **Initialization of array** Array can be made initialization at the time of declaration itself. The general form of array initialization is as below  1.Data type array name[size] 2. Data type array name[size]={element1,element2,element3,.....} Example: int a[[4]={1,5,8,4} char d[3]={'A','R',u...

Types of Function in C language return type function (argument) use

 Function use example: 1. Function with no argument (parameters) & no return value: Basic example program addition #include<stdio.h> void add(void); int main() { add(); } void add() { int x,y=56,z=45; x=y+z; printf("ADD=%d",x); } Output are: ADD=101 2. Function with no argument but return type: Here called function is independent and are initialized . The value aren't passed by The calling function .Here the calling function and called function are communicated party with each other.   Basic example program addition #include<stdio.h> int  add(void); int main() { add(); } int add(void) { int x,y=56,z=45; x=y+z; printf("ADD=%d",x); } Output are: ADD=101 3. Function with argument but no return value Here the function have argument so the calling function send date to the called function but called function dose not return value. Here the result obtained by the called function.   Basic example program addition #include<stdio.h> void add(int y,...

Two dimensional array in C language or matrix program in c language

 Two dimensional arrays: 1.Two dimensional array is known as matrix. 2.An array with two subscripts is termed as two-dimensional array. 3.We know that a one dimensional array can store a row of elements, so a two-dimensional array enables us to store multiple roes of elements. The syntax of declaring a two-dimensional array is : Data-type array name[row][column]; For reading value : for(k=0;k<4;k++) { for(l=0;l<3;l++) { scanf("%d",&a[k][l]); } } For displaying value : for(k=0;k<4;k++) { for(l=0;l<3;l++) { printf("%d",a[k][l]); } printf("\n"); } Simple Matrix Program : #include"stdio.h" int main() { int a[3][3]; int k,l; printf("Enter the array elements: \n"); for(k=0;k<3;k++)  //for reading value// { for(l=0;l<3;l++) { printf("Enter a[%d][%d] :",k,l); scanf("%d",&a[k][l]); } } printf("\n\nMatrix are: \n"); for(k=0;k<3;k++)  //for displaying value...