Ask Question - Get Answer

1 Ans A C program to input and display an Array

Asked by AL MaMun (4 Golds) Friday, 31 Jul 2020, 04:11 PM at (Education Tutorials)

Please log in to answer, like and save
0
Save 0

<<< Previous
Log in to Answer Next >>>

Answer(s):

C program to input and display a C array.


#include<stdio.h>

int main()

{

    int arr[100], i, n, j;

    printf("Enter N\n");

    scanf("%d", &n);

    printf("Enter numbers in the array: \n");

    for(i=0; i<n; i++)

    {

        scanf("%d", &arr[i]);

    }

    for(j=0; j<n; j++)

    {

        for(i=j+1; i<n; i++)

        {

            printf("{%d,%d},", arr[j], arr[i]);

        }

    }

    return 0;

}


Answered by AL MaMun (4 Golds) Friday, 31 Jul 2020, 04:11 PM

Please log in to Upvote, Downvote and Report
           

Related Q/A:

1 Ans 41st BCS Technical Subjective Written Exam Question Download

1 Ans A C program to input and display an Array

1 Ans Write a C program to find the highest and lowest number in a series

1 Ans Bank Exam all important Writing Materials

1 Ans Write a C program to reverse a number

1 Ans How to Learn HTML - HyperText Markup Language easily? 

1 Ans Write a C program to implement x power n using recursion

1 Ans Write a C++ program for BigMod math

1 Ans Write a C program to print Fibonacci number using recursion

1 Ans Write a C program to implement Insertion sort data structure and algorithm