Category: C language

Sum of the Matrix- using Pointers

                                                Matrix Sum- Using Pointers #include<stdio.h>#include<stdlib.h> int ** createMatrix(int,int);void readMatrix(int **, int, int);int findSum(int **, int, int);int main() {    int m,n;    //printf("Enter Rows");    scanf("%d",&m);    //printf("Enter Columns");    scanf("%d",&n);   

Patterns- Efficient Methodologies

                      BASIC PATTERN LOGIC PATTERN ** ** * ** * * ** * * * * Program(Method 1):#include <stdio.h>void main()({   int i,j,n;   printf("Enter the Number of lines:");   scanf("%d",&n);   for(i=1;i<=n;i++)   {    for(j=1;j<=i;j++)        printf("%s","*");    printf("n");   }}Program(Method 2 – Best Method): #include <stdio.h>void

New Magician

New Magician You are a programming-savvy person and you never get involved in any extra-curricular activities. Your faculty mentor has ordered that you need to give one on-stage performance in the Induction Program for the first years to be held a week later. You were very tensed thinking about it and you could hardly sleep.

Snake and Ladder

Snake and Ladder                                The game of Snakes and Ladder is played by two or more players who take turns rolling a dice. There is usually 1 dice but more than 1 can also be used. The board is a 10

Increasing Sequence

Increasing Sequence A sequence a, a1, ..., at - 1 is called increasing if ai - 1 < ai for each i: 0 < i < t. You are given a sequence b, b1, ..., bn - 1 and a positive integer d. In each move you may choose one element of the given sequence and add d to

No. of Distinct Elements in an unsorted array

No. of Distinct Elements in an unsorted array Write a program to find the number of distinct elements in a unsorted array. [Do it without sorting the array] Input Format: Input consists of n+1 integers.The first integer corresponds to n, the number of elements in the array.The next n integers correspond to the elements in

C Program to check given String is Pangram or not

          C Program to check given String is Pangram or not Pangram:           A Pangram is a sentence containing every letter of the alphabet. Example: Let us consider a sentence as given below: The quick brown fox jumps over the lazy dog.  The above sentence containing every letter of the alphabet.

Odd Length String Diagonal Pattern [ZOHO]

               Odd Length String Diagonal Pattern [ZOHO] An odd length string S of length L is passed as the input.The program must print the string S as two diagonals as shown in the example  Input/Output below. Input Format:The first line will contain S. Output Format: L lines will contain

Message Encryption

                                                     Message Encryption                                   To encrypt messages Jil will first decide on the number of