Solved

struct record

Posted on 2000-03-04
1
328 Views
Last Modified: 2010-04-15
I defined a array of struct record e.g.
struct studrec {  char studid[13];
                  char name[20];
                } students[50];

how to pass this array to a function ?
0
Comment
Question by:adrianmak
1 Comment
 
LVL 84

Accepted Solution

by:
ozo earned 10 total points
ID: 2583886
void func(struct studrec *array){
 int i;
  for( i=0; i<50; i+=1 ){
     printf("%12.12s:%19.19s\n",array[i].studid,array[i].name);
  }
}

func(students);
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Statment to match two tables in c# 6 78
Certified Pentester Exam - need assistance on compiling an exploit 6 396
Read file descriptor 3 in C 14 107
C dll call freezes 5 101
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question