This Declaration of (*p)[n] for Pointer Array (Array with Pointer). I cannot Scanf Array From User This Program PLEASE REPLY WITH A CORRECT ANSWER .#include <stdio.h>
int main()
{
int i,n;
scanf("%d",&n);
int (*a)[n];
int *p;
p = *a;
for(i=0;i<n;i++)
{
scanf("%d",(p+i)); <em><strong>// This Shows Segmentation Fault </strong></em>
}
for(i=0;i<n;i++)
{
printf("%d",*(p+i));
}
return 0;
}
.
New Questions |
---|
trustworthy online casino in New Zealand - C
|
SSM Exam - Other
|
SPC Exam - Other
|
SAFe-Practitioner Exam - Other
|
SAFe-Agilist Exam - Other
|
P_SAPEA_2023 Exam - Other
|
POPM Exam - Other
|