The iterative statement is one of the most important and interesting statements in the programming world. An iterative statement is used to repeat the execution of a list of statements, depending on the value of an integer expression.

When you are using SWITCH case, it is important to keep in mind that the inclusion of DEFAULT LABEL. This will inform you whether you are executing your program in right or wrong way. So, it is always recommended to use DEFAULT LABEL in the SWITCH st

The test expression done on exact statement. The good habit of using test expression on exact or fulfill statement. So do not use floating point numbers for checking for equality in the test expression.

Missing the inclusion of appropriate header file in c program will generate an error. Such a program may compile but the linker will given an error message as it will not be able to find the functions used in the program.

Specifier is a typedef-name and a very sensitive in C programming. Using an incorrect specifier for the data type being read or written will generate a run time error.

// AHF C PROGRAM SOLVING //solving here 2_D ARRAY programming problem

#include<stdio.h> #include<math.h> #define pf printf int main() { int i,n1,n2,m,arr1[100],arr2[100],arr3[1000],index=0; //taking data for first array pf("Enter the number of element in the first array: "); scanf("%d",&n1); pf("\nEnter element of the first array: "); for(i=0;i < n1;i++) scanf("%d",&arr1[i]); //taking data for second element pf("\n\nEnter the number element in the second array: "); scanf("%d",&n2); pf("\nEnter the element of the second array: "); for(i=0;i < n2;i++) scanf("%d",&arr2[i]); //calculating new array length m=n1+n2; //joining two array for(i=0;i < n1;i++) { arr3[index]=arr1[i]; index++; } //joining second array with first array for(i=0;i < n2;i++) { arr3[index]=arr2[i]; index++; } //printing new merged array pf("\n\nThe merged array is: "); for(i=0;i < m;i++) pf("\t%d",arr3[i]); return 0; }

Enter the number of element in the first array: 3 Enter element of the first array: 1 2 3 Enter the number element in the second array: 5 Enter the element of the second array: 4 5 6 7 8 The merged array is: 1 2 3 4 5 6 7 8

- Array_ sum and mean of N numbers
- Array_ find largest of N numbers
- Array_ print the smallest of N numbers
- Array_ interchange large and smallest number
- Array_ print largest and smallest number with position separately
- Array 2_D - calculate marks of 5 students in 3 subject and display the highest marks in each subject
- Array 2_D - read and display ( 3 * 3 ) matrix
- Array 2_D - multiplication of two ( m * n ) matrix

© 2018 - All rights reserved