Answers for "c struct initialization"

3

c++ initialize a struct

struct address {
    int street_no;
    char *street_name;
    char *city;
    char *prov;
    char *postal_code;
};

address temp_address = {
  0,  // street_no
  nullptr,  // street_name
  "Hamilton",  // city
  "Ontario",  // prov
  nullptr,  // postal_code
};
Posted by: Guest on December-09-2020
0

struct initialization

struct Person
{
    char name[50];
    int citNo;
    float salary;
} person1, person2, p[20];
Posted by: Guest on June-17-2021

Code answers related to "Objective-C"

Browse Popular Code Answers by Language