Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
C program to modify a multidimensional array to make it one dimensional array
+1
vote
asked
Apr 9, 2019
by
anonymous
array input-{1,2,{8,9},3,4,{5,{10,21,{5}},6,7}}
desired output-{1,2,8,9,3,4,5,10,21,5,6,7}
please-help
urgent
c
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
2 Answers
0
votes
answered
Apr 9, 2019
by
Luiz Otávio
(
150
points)
https://www.youtube.com/watch?v=S9uPNppGsGo
enjoy!!!
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
0
votes
answered
Apr 12, 2019
by
coder
#include<stdio.h>
#include<conio.h>
void main()
{
int x[5][5],t[25],i,j,n;
printf("\nIn multidimention array\n");
printf("\nEnter array size:");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
printf("\n%d of %d element:",i,j)
scanf("%d",&x[i][j]);
t[i]=x[i][j];
}
}
printf("\n---------------------------------------------------------------------------------------------------------\n");
printf("\nIn single dimention array\n");
for(i=0;i<n;i++)
{
printf("%d\t",t[i]);
}
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...