Programming in C

Define data type NodeCD, declare 100 variables of CD1 & access data?

Questions by Manali Banerjee

Showing Answers 1 - 3 of 3 Answers

shraisy

  • Sep 20th, 2011
 

Code
  1. struct nodeCD               //defining node

  2. {

  3. int data;

  4. struct node *next;

  5. }

  6. struct nodeCD arr[100]; // declaring 100 variables of type structure

  7.  

  8. for(i=0;i<100;i++)        // to access

  9. {

  10. scanf("%d",&arr[i]);

  11. printf("%d

  12. , arr[i]);

  13. }



please correct me if wrong !

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions