Create New Nodes

QUESTION

Your job is to create number of nodes as per user request using pointer”, “TESTCASE_1”: “4\n1 4 5 99\n###—###SEPERATOR—###—\n1 4 5 99.

“TESTCASE_2”: “5\n1 4 5 99 100\n###—###SEPERATOR—###—\n1 4 5 99 100”, “TESTCASE_3”: “2\n1 4\n###—###SEPERATOR—###—\n1 4”, “TESTCASE_4”: “0\n###—###SEPERATOR—###—\n0”, “TESTCASE_5”: “0\n###—###SEPERATOR—###—\n0

ANSWER

#include <stdio.h>
int main()
{
int n,i,a[20];
  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&a[i]);
  for(i=0;i<n;i++)
   printf("%d ",a[i]);
return 0;}
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.