Write a Simple C Function Program that prints the Messages i.e Good Morning? & Good Evening!

Engg.... | 18:51 | | Best Blogger Tips
Messages

Statement of C Program: This Program prints the Messages i.e Good Morning? & Good Evening! with the help of Function :

This is the Simplest C Function Program. Functions are the basic building blocks of C Program.

#include<stdio.h>
void msg();                                            /* Function Declaration */

read more

WAP to Find the Largest Number among Two Numbers by using Function

Engg.... | 05:53 | | Best Blogger Tips
Largest Number

Statement of C Program: This Program prints the Largest Number among two Numbers by using Function.

#include<stdio.h>
#include<conio.h>
void main()
{
float a , b , max;
clrscr();
read more

WAP to Compute the Sum of two Number by using Function

Engg.... | 05:41 | | Best Blogger Tips
Sum

Statement of C Progream: This Program accepts two Integers and Computes their Sum via addnums() :
There are two methods to write this Program
  1. NON ANSI style
  2. ANSI style
1. NON ANSI style:

#include<stdio.h>
#include<conio.h>
void main()
{
int a , b , result;
clrscr();
printf(" Enter the value of two numbers\n");
scanf("%d%d" , &a , &b);
read more

Detailed overview of C Language Function [Tutorial]

Engg.... | 06:18 | | Best Blogger Tips
Function

Functions:
Function is a set of instructions to carry out a particular task. The Function after processing returns a single value.
In other word, we say a Function is a group of statements that can perform any particular task. 

Types of functions:
Types of Functions

There are two types of Functions in C
  1. Standard Functions  (Pre-defined Functions)
  2. User-defined Functions
read more

WAP to Find the Average Male Height and Female Height in the Class

Engg.... | 18:10 | | Best Blogger Tips
Average Height

Statement of C Program: This Program Prints the Average Height of Male and Female :

#include<stdio.h>
#include<conio.h>
void main()
{

int mh[3] , fh[3] , i ;           /* mh stands for Male Height and fh stands for Female Height */

float mtot , ftot ;          /* mtot stands for Male total height and ftot stands for Female total Height */

float mavg , favg ;       /* mavg stands for Males Average Height and favg stands for Females Average Height */

read more

WAP to Find the Largest and Second Largest Number out of 10 Array Elements

Engg.... | 05:54 | | Best Blogger Tips
Largest and Second Largest Number

Statement of C Program: This Program Prints the Largest and Second Largest Number out of 10 Array Elements:

#include<stdio.h>
#include<conio.h>
void main()
{
int A[10];
int i , j , b;
clrscr();

read more

Write a C Program to Find the Sum of All the Positive and Negative Numbers in Array

Engg.... | 05:06 | | Best Blogger Tips
Positive and Negative Number Sum

Statement of C Program: This Program reads N integers (+ve , -ve and zero) into an Array A and Finds
  1. The sum of positive numbers
  2. The sum of negative numbers
  3. The average of all input numbers.
#include<stdio.h>
#include<conio.h>
#define MAX 8
void main()
{
int Array[MAX] ;
int i , N ;

int negsum , posum;    
/* negsum stands for Sum of Negative Numbers and posum stands for Sum of Positive Numbers */

read more

Write a C Program to Calculate the Trace and Normal of a Matrix

Engg.... | 00:18 | | Best Blogger Tips
Trace and Normal of Matrix
Statement of C Program: This Program accepts a square matrix and prints the Trace and Normal of the Matrix.

Trace of Matrix



Trace: Trace of a Matrix can be defined as the sum of the main diagonal elements.






read more

Write a C Program to Print the Multiplication of Two Matrices

Engg.... | 02:05 | | Best Blogger Tips
    Multiplication of Matrix
    Statement of C Program: This Program accepts two Matrices of different or same order and Find the product of these Matrices and prints the Product Matrix:

    Condition: The Column of First Matrix must be Equal to the Row of the Second Matrix.


    read more

    Write a C Program to Print the Transpose of a Matrix

    Engg.... | 01:12 | | Best Blogger Tips
    Transpose of Matrix

    Transpose: Transpose of a Matrix means changing Rows into Columns and vice-versa.


    Statement of C Program: This Program accepts the Matrix and prints its Transpose.

    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    int A[2][3] , B[3][2];
    int i, j;                                   /* 'i' used for rows and 'j' used for columns */
    clrscr();
    read more

    Write a C Program to Print the Sum of Two Matrices of Same Order

    Engg.... | 23:19 | | Best Blogger Tips
    Sum of Matrices

    Statement of C Program: This Program accepts two Matrices and Find the Sum of these Matrices and prints the Sum Matrix.

    Condition: Both the Matrices are of Same Order i.e Same Order Matrices can be Added or Substracted.

    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    int Matrix1 [2][2] , Matrix2 [2][2] , Matrixsum[2][2] ;             
    int i, j;                                        /* 'i' used for rows and 'j' used for columns */
    clrscr();

    read more

    WAP of C language to Print the Matrix of Fixed or Desired Order

    Engg.... | 22:42 | | Best Blogger Tips
    Matrix
    Statement of C Program: This Program Reads and prints the elements of a Matrix:

    #include<stdio.h>
    #include<conio.h>
    void main()
    {
    int matrix[9][9] ;                           /* Maximum Elements in the Matrix is 81 */
    int matrix[3][3];                                      /* matrix of 9 elements */
    int i, j;                                        /* 'i' used for rows and 'j' used for columns */
    clrscr();

    read more

    Detailed Discription of 2-D Array of C Language[Tutorial]

    Engg.... | 22:40 | | Best Blogger Tips
    Multi-Dimensional Array

    Multidemensional Arrays:

    If the number of subscripts is more than one, then such Arrays are called Multi-dimensional Arrays that is we can say 2-D Array , 3-D Array and so on. The dimensionality is understood from the number of pairs of square brackets placed after the Array name.

    Example: 
    1. Array 1[ ]  => 1-D Array
    2. Array 2[ ][ ]  => 2-D Array
    3. Array 3[ ][ ][ ]  => 3-D Array
    read more