Question: C++ programming A file infile.txt containscode which declares a user-defined type . The size of its members determines the size of a struct in bytes.
A file infile.txt containscode which declares a user-defined type . The size of its members determines the size of a struct in bytes. The types of a user-defined types members are limited to int, float, double, char, and arrays of int, float, double, and char. The size of int, float, double, and char are 4, 4, 8, and 1 byte(s), respectively.
The file has contents below.
infile.txt
struct ComplexType{
char locs [ 4 ] = "So!!";
int x = 2;
float y ;
double z [2] = {412.0,345};
} ;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
