CJCoding With Joseph
15free / daySign inCreate account
TitleOpen
421
Score Value Through Its PointerRead one integer from input and store it in score.
easyNot startedSolve
422
Set the Thermostat Through Its Pointertemperature and the pointer tp are already declared for you.
easyNot startedSolve
423
Two Pointers Share One Countercounter is set to 10 and p already points at it.
easyNot startedSolve
424
Guard a Pointer With a NULL Checkp starts out as NULL and the first check is already written.
easyNot startedSolve
425
Prove a Pointer Holds x's Addressx, y and the pointer p (aimed at x) are declared for you.
easyNot startedSolve
426
Pointer Size Versus int SizePrint the three sizes below.
easyNot startedSolve
427
Read-Only Access With a const int Pointerp is a const int already pointing at basePrice, and that line is printed for you.
easyNot startedSolve
428
Next Letter Through a char PointerRead one character from input into letter, point a char pointer named cp at it, print the letter through the pointer, then advance the letter by one BY WRITING THROUGH cp.
easyNot startedSolve
429
Discount a double Price Through Its PointerRead one price (a decimal number) from input, point a double pointer named pp at it, print the original price, then apply a 10 percent discount by writing through pp (pp = pp 0.9;).
easyNot startedSolve
430
Add Two Inputs Using Only Their PointersRead two integers into a and b, then declare int pointers pa and pb holding their addresses.
easyNot startedSolve
431
Peek Ahead Using *(p + 1)An int array readings holds {12, 25, 37, 48, 56}, and a pointer p already points at readings[0].
easyNot startedSolve
432
Array Name Decays to Its First ElementAn int array temps holds {30, 41, 52, 63}.
easyNot startedSolve
433
March Through Sensors with p++An int array sensors holds {7, 14, 21, 28, 35} and a pointer p starts at sensors[0].
easyNot startedSolve
434
Sum Five Scores Through a PointerRead 5 whole numbers from input into the array scores (that loop is already written for you).
easyNot startedSolve
435
Compare Two Pointers Into One ArrayTwo pointers point into the same array values = {2, 4, 6, 8, 10, 12}: a points at values[1] and b points at values[4].
easyNot startedSolve
436
Pointer Difference Gives the IndexThe array line holds {5, 10, 15, 20, 25, 30, 35, 40}.
easyNot startedSolve
437
Find the Highest Reading with a Roaming PointerRead 6 whole numbers from input into the array readings (that loop is already written).
easyNot startedSolve
438
Prove arr[i] Matches *(arr + i)The array data holds {9, 18, 27, 36} and i is 2.
easyNot startedSolve
439
Walk One Row of a 3x4 GridThe 2D array grid has 3 rows of 4 ints, and the pointer row walks row 1, which is {5, 6, 7, 8}.
easyNot startedSolve
440
March to the Null TerminatorOne word is read from input into word (already written for you) and the pointer p starts at its first character.
easyNot startedSolve
441
Value Copy vs Pointer: Two Ways to Pass an IntThe variable score starts at 10.
easyNot startedSolve
442
Swap Two Scores With a Pointer HelperWrite the helper void swapScores(int a, int b) so that it exchanges the two ints its parameters point at.
easyNot startedSolve
443
Bump a Counter Through a Pointer ParameterComplete void increment(int counter) so it adds 1 to the int its parameter points at.
easyNot startedSolve
444
Send Back Sum and Difference With Two Out-ParametersComplete void sumAndDiff(int a, int b, int sum, int diff) so it stores a + b in the int that sum points at, and a - b in the int that diff points at.
easyNot startedSolve
445
Total Five Readings Through an int Pointer ParameterComplete int total(int values, int count) so it returns the sum of the first count elements.
easyNot startedSolve
446
Greet a Name Passed as a const char PointerComplete void greet(const char name) so it prints one line made of Hello, a comma, a space, the name, an exclamation mark, and a newline.
easyNot startedSolve
447
Measure a Word by Walking a char PointerComplete int stringLength(const char s) so it returns how many characters come before the '\0'.
easyNot startedSolve
448
Count One Letter While Stepping a char PointerComplete int countLetter(const char s, char target) so it returns how many times target appears in the string s.
easyNot startedSolve
449
Print Coordinates With the Arrow Operatormain already declares struct Point p = {3, 7}; and struct Point ptr = &p;.
easyNot startedSolve
450
Print a Book Record Through a Struct Pointer ParameterComplete void printBook(const struct Book b) so it prints the two fields of the book it was given, using the arrow operator.
easyNot startedSolve
451
Heap Array Sized by the UserRead an integer n from input, then read n more integers.
mediumNot startedSolve
452mediumNot startedSolve
453
Grow a Heap Array with reallocRead an integer n, then n integers.
mediumNot startedSolve
454
Heap Array of Sensor ReadingsThe Reading struct is provided.
mediumNot startedSolve
455
Factory Function Returns a Heap ArrayWrite make_squares(n) so it returns a heap array of n ints where element i holds (i + 1) (i + 1).
mediumNot startedSolve
456
Build Your Own my_strdupWrite my_strdup(s) so it returns a brand-new heap string holding the same characters as s.
mediumNot startedSolve
457
Free It, Then NULL ItRead an integer n.
mediumNot startedSolve
458
Deep Copy a Player with a char* NameThe Player struct is provided.
mediumNot startedSolve
459
Array of Pointers to Heap WordsRead an integer n, then n words.
mediumNot startedSolve
460
Multiplication Grid Through an int Double PointerBuild a two-dimensional grid on the heap using a double pointer (int ): an array of rows row pointers, each owning its own block of cols ints.
mediumNot startedSolve
461
Row-Major Matrix in One malloc BlockStore the whole matrix in a SINGLE block of rows cols ints and index it row-major (block[r cols + c]).
mediumNot startedSolve
462
Allocate a Label Through a char ** Out-ParameterComplete this function (the signature is given and must not change): void make_label(const char name, int count, char out) It must allocate a new string holding name, then x , then count — for example bolts and 7 produce bolts x 7 — and store that pointer in out.
mediumNot startedSolve
463
Transform an Array Through a Callback PointerThe function triple is already written for you.
mediumNot startedSolve
464
Arithmetic Dispatch Table of Function PointersThe four operations and their names are already written for you.
mediumNot startedSolve
465
qsort Scores From High to LowWrite a qsort comparator that sorts DESCENDING (largest first), then in main read an integer n (at most 64), read n scores, sort them with qsort, and print them on one line separated by single spaces with no trailing space.
mediumNot startedSolve
466
Three-Node Chain Built With mallocBuild a three-node singly linked list whose nodes live on the HEAP, walk it once, then tear it down.
mediumNot startedSolve
467
Reverse an Array With Two Walking PointersReverse an array in place using TWO POINTERS instead of indexes.
mediumNot startedSolve
468
Count Matches With a Pointer WalkScan an array with a MOVING POINTER rather than an index.
mediumNot startedSolve
469
Sorted Insert Into a Linked ListBuild a singly linked list that is kept in ascending order the whole time you are filling it.
hardNot startedSolve
470
Reverse a Singly Linked List In PlaceRead an integer n, then n more integers, and build a singly linked list holding those values in the order they were read (the first value read is the head).
hardNot startedSolve
471
Growable Integer Stack with reallocWrite a stack of ints backed by ONE dynamically allocated array that doubles with realloc when it runs out of room.
hardNot startedSolve
472
Append Numbers to a Linked List TailRead integers from standard input until the input runs out, appending each value to the TAIL of a singly linked list so the list holds them in the order they arrived.
hardNot startedSolve
473
Delete a Linked List Node by ValueRead an integer n, then n values, and build a singly linked list holding them in the order they were read.
hardNot startedSolve
474
Binary Search Tree Inorder Walk and FreeRead an integer n, then n values, and insert each one into a binary search tree: a value smaller than a node goes left, larger goes right.
hardNot startedSolve
475
Heap Matrix Product with Full CleanupMultiply two matrices that you build yourself on the heap.
hardNot startedSolve
476
Generic Byte Swap with void Pointers and memcpyWrite one swap function that works for any type, then use it on three of them.
hardNot startedSolve
477
Growable Score Roster with realloc and Owned NamesThe struct is given to you: typedef struct { char name; int score; } Entry; Read an integer n (always 1 or more), then n lines, each holding a one-word name (at most 63 characters) and an integer score.
hardNot startedSolve
478
Ragged Row Table on the HeapRead an integer n, the number of rows.
hardNot startedSolve
479
Deep Copy a Heap Hero RecordThe struct is given to you: typedef struct { char name; int level; } Hero; Read one word (the name, at most 63 characters) and an integer level from stdin.
hardNot startedSolve
480
Split a Line into a Heap Token ArraySplit one line of text into words and store them in a char where every element is its own malloc copy of a word.
hardNot startedSolve