0% found this document useful (0 votes)
6 views1 page

Introduc) On To C Language Lab Assignment 4 (Batch)

Lab question for C lang

Uploaded by

itssahilhere31
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)
6 views1 page

Introduc) On To C Language Lab Assignment 4 (Batch)

Lab question for C lang

Uploaded by

itssahilhere31
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/ 1

Introduc)on to C Language

Lab Assignment 4 (Batch B)

1. Write a C program to declare a 1-D array of size 10. Ini;alize the array and
display the array. Determine the sum and products of elements of array and
display them.

2. Write a c program that compares two integer arrays to see whether they are
iden;cal or not. This program prints 1 if they are iden;cal, 0 otherwise.

3. Write a C program to declare a 1-D array of size 10. Ini;alize the array and
then swap the largest and smallest element of the array. Display the array before
and aDer swapping.

4. Write a C program to determine the second largest element of a 1-D array of


size 10.

5. Write a C program to swap the 1st and last element of a 1-D array of size 10.
Display the array before and aDer swapping.

6. Write a C program to declare a 1-D array of size 10. Ini;alize the array and
display them. Display the array in reverse order.

7. Write a C program to find the missing number in an array containing numbers


from 1 to N.

8. Write a program in C to separate odd and even integers into separate arrays.

9. Write a C program to input n numbers in an array, calculate the sum of all even
numbers and all odd numbers in the array and print the larger sum.

10. Given are two one-dimensional arrays A and B which are sorted in ascending
order. Write a program to merge them into a third single sorted array that
contains every item from arrays A and B, in ascending order.

You might also like