0% found this document useful (0 votes)
22 views

NAME: Yogesh B. Zalte Roll No.: Tetb228

This document contains code for a C program that takes 25 numbers as input from the user and stores them in an array. It then takes another number as input and searches that array to see if the number is present and if so, at which position. It prints the position and number of times that input number is present in the array.

Uploaded by

Yogesh Zalte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

NAME: Yogesh B. Zalte Roll No.: Tetb228

This document contains code for a C program that takes 25 numbers as input from the user and stores them in an array. It then takes another number as input and searches that array to see if the number is present and if so, at which position. It prints the position and number of times that input number is present in the array.

Uploaded by

Yogesh Zalte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

NAME : Yogesh B.

Zalte

ROLL NO. : TETB228

# include <stdio.h>

# include <stdlib.h>

# include <conio.h>

//Practical no.2 / question 1:-25 numbers are entered from keyboard in to an array

int main(){

int i,A;

int j=0;

int numbb [25]={};

for (i=0;i<=24;i++){

printf("Enter the %d number of the array you want to print:-", i);

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

printf("Enter the number u want to search A=");

scanf("%d",&A);

for (i=0;i<=24;i++){

if(numbb[i]==A){

printf("Number A is present in the array at position [%d] \n", i);


j=j+1;

}printf("The number is present %d times", j);

return 0;

You might also like