Write a program to store 5 elements in the array P and 3 elements in the array Q.Produce a third array R after joining the array P and Q.Display the resultant array.
program to store 5 elements in the array P and 3 elements in the array Q.
- 4558 Views
- 1 Answers
1 Answers
-
-
- 30 Jul
- 0 Comment
-
- Left Shift and Right Shift Operators in C
- What is the eligibility criteria for cracking the C Progamming Exam 2018?
- Who invented C C++ and Java? Explain your answer
- What are preprocessor directives in c language?
- Лучшие игры 3d на Андроид
- Should I learn C before C++? Explain your answer
- Explain the difference between while loop and do-while loop.
- Can someone explain the concept of pre and post increment in C?
- What does a person require to opt C programming as a career?
- What is C used for? Explain your answer
Practice Mock Test
c programming
#include<stdio.h>br /#include<conio.h>br /void main()br /{br / int p[5],q[3],r[8],i,j;br /clrscr();br /printf("enter the elements of an array P-\n");br /for(i=0;i<5;i++)br /scanf("%d",&p[i]);br /printf("enter the elements of an array Q-\n");br /for(i=0;i<5;i++)br /scanf("%d",&q[i]);br /printf("After joining P and Q..............-\n");br /for(i=0;i<5;i++)br /r[i]=p[i];br /for(j=0;j<3;j++)br /{br / r[i]=q[j];br /i++;br /}br /printf("Total elements of an array R-\n");br /for(i=0;i<8;i++)br /printf("%d\n",r[i]);br /getch();br /}br /