GeekInterview.com
Series: Subject: Topic:
Question: 21 of 246

Programming in C

Define data type NodeCD, declare 100 variables of CD1 & access data?
Asked by: Manali Banerjee | Member Since Sep-2011 | Asked on: Sep 1st, 2011

View all questions by Manali Banerjee

Showing Answers 1 - 1 of 1 Answers
shraisy

Answered On : Sep 20th, 2011

View all answers by shraisy

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 !

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.