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
send me the body of array program??
0
votes
asked
Nov 12, 2017
by
Fizza Sajjad
(
300
points)
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.
3 Answers
0
votes
answered
Nov 12, 2017
by
Swastik Chakrabarti
(
220
points)
/* Program to print an array initialized within the program*/
#include<stdio.h>
void main()
{
int a[5],i;
a={1,2,3,4,5,6}
printf("\nThe array is:\n");
for(i=0;i<n;i++)
{
printf("%d",a[i]);
}
getch();
}
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
Nov 12, 2017
by
Swastik Chakrabarti
(
220
points)
/* program to print an array whose elements supplied externally*/
#include<stdio.h>
void main()
{
int n,a[50],i;
printf("\n Enter the size of the array <=50:\n");
scanf("%d", &n );
printf("\n Enter the elements:\n");
for(i=0;i<n;i++)
{
scanf("%d", &a[i]);
}
printf("\n The array of size %d is entered by you is:\n",n);
for(i=0;i<n;i++)
{
printf("%d\n", a[i]);
}
getch();
}
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
Nov 12, 2017
by
Swastik Chakrabarti
(
220
points)
These codes are for windows environment
commented
Nov 13, 2017
by
Fizza Sajjad
(
300
points)
reshown
Nov 14, 2017
by
Fizza Sajjad
THANX FOR SENDING ME THIS
commented
Nov 13, 2017
by
Swastik Chakrabarti
(
220
points)
Happy to help!! :))
commented
Nov 14, 2017
by
Fizza Sajjad
(
300
points)
hahahahah god bless you from fiya khan
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.
...