CJCoding With Joseph
15free / daySign inCreate account
TitleTopicsAction
124
Create and Print a PointA Point struct (with int fields x and y) is defined for you. In main, create a P...
easy○ Not Started
Structs
Solve
125
Set a Struct FieldA Counter struct with an int field value is defined. In main, create a Counter, ...
easy○ Not Started
Structs
Solve
126
Sum of Two Struct FieldsA Pair struct with int fields a and b is defined. In main, create a Pair with a ...
easy○ Not Started
Structs
Solve
127
Rectangle Area from StructA Rectangle struct with int fields width and height is defined. In main, create ...
easy○ Not Started
Structs
Solve
128
Rectangle Perimeter from StructA Rectangle struct with int fields width and height is defined. In main, create ...
easy○ Not Started
Structs
Solve
129
Student RecordA Student struct with a char array name and an int age is defined and initialize...
easy○ Not Started
Structs
Solve
130
Box VolumeA Box struct with int fields length, width, and height is defined. In main, crea...
easy○ Not Started
Structs
Solve
131
Modify a Struct FieldA Score struct with an int field points is defined and starts at 10. Add 5 to it...
easy○ Not Started
Structs
Solve
132
Compare Two Struct FieldsA Pair struct with int fields a and b is defined and initialized in main. Print ...
easy○ Not Started
Structs
Solve
133
Larger Struct FieldA Pair struct with int fields a and b is defined and initialized to {12, 4}. Pri...
easy○ Not Started
Structs
Solve
134
Average of Three FieldsA Triple struct with int fields a, b, and c is defined and initialized to {10, 2...
easy○ Not Started
Structs
Solve
135
Format a Time StructA Time struct with int fields hours and minutes is defined and initialized to {9...
easy○ Not Started
Structs
Solve
136
Copy a StructA Point struct (int x, y) is defined. Create a Point p = {5, 8}, then copy it in...
easy○ Not Started
Structs
Solve
137
Celsius Struct to FahrenheitA Temperature struct with an int field celsius is defined and initialized to {10...
easy○ Not Started
Structs
Solve
138
Bank Account DepositAn Account struct with an int field balance is defined and starts at 100. Deposi...
easy○ Not Started
Structs
Solve
236
Point Struct: Store and Print CoordinatesDefine a struct type named Point that has two integer fields, x and y. Inside ma...
easy○ Not Started
Structs
Solve
237
Rectangle Struct: Compute the AreaDefine a struct type named Rectangle with two integer fields, width and height. ...
easy○ Not Started
Structs
Solve
238
Student Struct: Name and GradeDefine a struct type named Student with a text field name (a char array) and an ...
easy○ Not Started
Structs
Solve
239
Point Struct: Sum of CoordinatesDefine a struct type named Point with integer fields x and y. In main, create a ...
easy○ Not Started
Structs
Solve
240
Rectangle Struct: Compute the PerimeterDefine a struct type named Rectangle with integer fields width and height. Creat...
easy○ Not Started
Structs
Solve
241
Book Struct: Title and Page CountDefine a struct type named Book with a text field title (a char array) and an in...
easy○ Not Started
Structs
Solve
242
Circle Struct: Radius and DiameterDefine a struct type named Circle with a single integer field radius. Create a C...
easy○ Not Started
Structs
Solve
396
Initialize a Struct with Designated InitializersA `struct Point` has `int` fields `x` and `y`. Create a point using designated i...
easy○ Not Started
Structs
Solve
397
Define a Struct Type with typedefUse `typedef` to define a struct type named `Rect` that has two `int` fields, `w...
easy○ Not Started
Structs
Solve
398
Store a Name in a StructA `struct Person` holds a `char name[20]` and an `int age`. Create a person name...
easy○ Not Started
Structs
Solve
399
Access a Field Through a PointerA `struct Point` with `x = 7` and `y = 2` exists, along with a pointer `ptr` to ...
easy○ Not Started
Structs
Solve
400
Size of a StructA `struct Triple` contains three `int` fields: `a`, `b`, and `c`. Print the numb...
easy○ Not Started
Structs
Solve
401
Reflect a Point Across the OriginA `struct Point` starts at `x = 3`, `y = -5`. Reflect it across the origin by ne...
easy○ Not Started
Structs
Solve
402
Toggle a Flag FieldA `struct Switch` has an `int` field `on` that is currently 1. Toggle it so that...
easy○ Not Started
Structs
Solve
403
Age from Birth YearA `struct Person` stores a `birthYear` of 1990. Given that the current year is 2...
easy○ Not Started
Structs
Solve
404
Struct Assignment Copies ValuesIn C, assigning one struct to another copies all of its fields. Copy point `a` (...
easy○ Not Started
Structs
Solve
405
Read a Field Through a const PointerA `struct Point` with `x = 8` and `y = 9` is pointed to by a `const struct Point...
easy○ Not Started
Structs
Solve
406
Print an Array of StructsAn array of three `struct Point` values holds `{1,2}`, `{3,4}`, and `{5,6}`. Loo...
easy○ Not Started
Structs
Solve
407
Zero-Initialize a StructA `struct Point` has three `int` fields: `x`, `y`, and `z`. Create one with ever...
easy○ Not Started
Structs
Solve
408
First Initial of a NameA `struct Person` stores `char name[20]` set to `"Grace"`. Print just the first ...
easy○ Not Started
Structs
Solve
139
Read Into a StructA Point struct (int x, y) is defined. Read two integers from input into a Point'...
medium○ Not Started
Structs
Solve
140
Function Returns a StructComplete the function makePoint so it builds and returns a Point from the two va...
medium○ Not Started
Structs
Solve
141
Function Takes a StructComplete the function area so it returns the area of a Rectangle passed to it (w...
medium○ Not Started
Structs
Solve
142
Sum a Field Across an Array of StructsAn Item struct has an int field price. Read an integer N, then read N prices int...
medium○ Not Started
Structs
Solve
143
Highest Score in Array of StructsA Player struct has an int field score. Read an integer N, then read N scores in...
medium○ Not Started
Structs
Solve
144
Modify a Struct via PointerComplete the function birthday so it increases a Student's age by 1 THROUGH A PO...
medium○ Not Started
Structs
Solve
145
Distance Between Two PointsA Point struct (int x, y) is defined. Read two points (four integers: x1 y1 x2 y...
medium○ Not Started
Structs
Solve
243
Rectangle Area with a FunctionDefine a struct type named Rectangle with integer fields width and height. Write...
medium○ Not Started
Structs
Solve
244
Array of Students: List and AverageDefine a struct type named Student with a text field name and an integer field g...
medium○ Not Started
Structs
Solve
245
Move a Point with a PointerDefine a struct type named Point with integer fields x and y. Write a function n...
medium○ Not Started
Structs
Solve
409
Count Passing StudentsAn array of five `struct Student` values holds the scores 55, 60, 72, 40, and 90...
medium○ Not Started
Structs
Solve
410
Swap Two StructsTwo points are given: `a = {1, 2}` and `b = {3, 4}`. Swap their contents so that...
medium○ Not Started
Structs
Solve
411
Lowest Value in an Array of StructsAn array of four `struct Item` values holds the `value` fields 34, 12, 27, and 8...
medium○ Not Started
Structs
Solve
412
Check if Two Structs Are EqualRead four integers from standard input describing two points: `a.x a.y b.x b.y`....
medium○ Not Started
Structs
Solve
413
Midpoint of Two PointsTwo points are given: `a = {2, 4}` and `b = {6, 8}`. Compute the midpoint by ave...
medium○ Not Started
Structs
Solve
414
Add Two VectorsWrite a function `add` that takes two `struct Vec` values and returns a new `str...
medium○ Not Started
Structs
Solve
415
Dot Product of Two VectorsTwo vectors are given: `a = {1, 2}` and `b = {3, 4}`. The dot product is `a.x*b....
medium○ Not Started
Structs
Solve
416
Total Cost of an OrderAn array of three `struct Item` values each has a `price` and a `qty`. The items...
medium○ Not Started
Structs
Solve
417
Add Two Complex NumbersA `struct Complex` has integer fields `re` (real part) and `im` (imaginary part)...
medium○ Not Started
Structs
Solve
146
Nested StructsAn Address struct (with a char array city and an int zip) is nested inside a Per...
hard○ Not Started
Structs
Solve
147
Sort Structs by a FieldA Player struct has an int field score. Read an integer N, then N scores into an...
hard○ Not Started
Structs
Solve
148
Scale a Vector StructA Vector struct (int x, y) is defined. Complete the function scale so it multipl...
hard○ Not Started
Structs
Solve
418
Simplify a FractionA `struct Fraction` holds `num = 6` and `den = 8`. Reduce it to lowest terms by ...
hard○ Not Started
Structs
Solve
419
Two-Node Linked ListA `struct Node` holds an `int value` and a `struct Node *next` pointer (a self-r...
hard○ Not Started
Structs
Solve
420
Read Students and Print the Top ScorerFirst read an integer `n` from standard input, then read `n` lines, each with a ...
hard○ Not Started
Structs
Solve