CJCoding With Joseph
15free / daySign inCreate account
TitleTopicsAction
421
Score Value Through Its PointerRead one integer from input and store it in `score`. Declare an `int` pointer na...
easy○ Not Started
Pointers
Solve
422
Set the Thermostat Through Its Pointer`temperature` and the pointer `tp` are already declared for you. Change `tempera...
easy○ Not Started
Pointers
Solve
423
Two Pointers Share One Counter`counter` is set to 10 and `p` already points at it. Declare a second `int` poin...
easy○ Not Started
Pointers
Solve
424
Guard a Pointer With a NULL Check`p` starts out as NULL and the first check is already written. Make `p` point at...
easy○ Not Started
Pointers
Solve
425
Prove a Pointer Holds x's Address`x`, `y` and the pointer `p` (aimed at `x`) are declared for you. Print the two ...
easy○ Not Started
Pointers
Solve
426
Pointer Size Versus int SizePrint the three sizes below. Cast each `sizeof` to `int` so `%d` is the correct ...
easy○ Not Started
Pointers
Solve
427
Read-Only Access With a const int Pointer`p` is a `const int *` already pointing at `basePrice`, and that line is printed...
easy○ Not Started
Pointers
Solve
428
Next Letter Through a char PointerRead one character from input into `letter`, point a `char` pointer named `cp` a...
easy○ Not Started
Pointers
Solve
429
Discount a double Price Through Its PointerRead one price (a decimal number) from input, point a `double` pointer named `pp...
easy○ Not Started
Pointers
Solve
430
Add Two Inputs Using Only Their PointersRead two integers into `a` and `b`, then declare `int` pointers `pa` and `pb` ho...
easy○ Not Started
Pointers
Solve
431
Peek Ahead Using *(p + 1)An int array readings holds {12, 25, 37, 48, 56}, and a pointer p already points...
easy○ Not Started
Pointers
Solve
432
Array Name Decays to Its First ElementAn int array temps holds {30, 41, 52, 63}. Fill in the three TODO lines: print t...
easy○ Not Started
Pointers
Solve
433
March Through Sensors with p++An int array sensors holds {7, 14, 21, 28, 35} and a pointer p starts at sensors...
easy○ Not Started
Pointers
Solve
434
Sum Five Scores Through a PointerRead 5 whole numbers from input into the array scores (that loop is already writ...
easy○ Not Started
Pointers
Solve
435
Compare Two Pointers Into One ArrayTwo pointers point into the same array values = {2, 4, 6, 8, 10, 12}: a points a...
easy○ Not Started
Pointers
Solve
436
Pointer Difference Gives the IndexThe array line holds {5, 10, 15, 20, 25, 30, 35, 40}. Pointer start points at li...
easy○ Not Started
Pointers
Solve
437
Find the Highest Reading with a Roaming PointerRead 6 whole numbers from input into the array readings (that loop is already wr...
easy○ Not Started
Pointers
Solve
438
Prove arr[i] Matches *(arr + i)The array data holds {9, 18, 27, 36} and i is 2. Print the element with data[i],...
easy○ Not Started
Pointers
Solve
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 i...
easy○ Not Started
Pointers
Solve
440
March to the Null TerminatorOne word is read from input into word (already written for you) and the pointer ...
easy○ Not Started
Pointers
Solve
441
Value Copy vs Pointer: Two Ways to Pass an IntThe variable score starts at 10. Fill in the two functions: - void byValue(int n...
easy○ Not Started
Pointers
Solve
442
Swap Two Scores With a Pointer HelperWrite the helper void swapScores(int *a, int *b) so that it exchanges the two in...
easy○ Not Started
Pointers
Solve
443
Bump a Counter Through a Pointer ParameterComplete void increment(int *counter) so it adds 1 to the int its parameter poin...
easy○ Not Started
Pointers
Solve
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 i...
easy○ Not Started
Pointers
Solve
445
Total Five Readings Through an int Pointer ParameterComplete int total(int *values, int count) so it returns the sum of the first co...
easy○ Not Started
Pointers
Solve
446
Greet a Name Passed as a const char PointerComplete void greet(const char *name) so it prints one line made of Hello, a com...
easy○ Not Started
Pointers
Solve
447
Measure a Word by Walking a char PointerComplete int stringLength(const char *s) so it returns how many characters come ...
easy○ Not Started
Pointers
Solve
448
Count One Letter While Stepping a char PointerComplete int countLetter(const char *s, char target) so it returns how many time...
easy○ Not Started
Pointers
Solve
449
Print Coordinates With the Arrow Operatormain already declares struct Point p = {3, 7}; and struct Point *ptr = &p;. Usin...
easy○ Not Started
Pointers
Solve
450
Print a Book Record Through a Struct Pointer ParameterComplete void printBook(const struct Book *b) so it prints the two fields of the...
easy○ Not Started
Pointers
Solve
451
Heap Array Sized by the UserRead an integer n from input, then read n more integers. Allocate an int array o...
medium○ Not Started
Pointers
Solve
452
calloc Proves the Bytes Are ZeroRead an integer n. Use calloc to allocate n ints, then print two lines: - "Befo...
medium○ Not Started
Pointers
Solve
453
Grow a Heap Array with reallocRead an integer n, then n integers. Allocate room for n ints and store them, the...
medium○ Not Started
Pointers
Solve
454
Heap Array of Sensor ReadingsThe Reading struct is provided. Read an integer n, then n lines of "label value"...
medium○ Not Started
Pointers
Solve
455
Factory Function Returns a Heap ArrayWrite make_squares(n) so it returns a heap array of n ints where element i holds...
medium○ Not Started
Pointers
Solve
456
Build Your Own my_strdupWrite my_strdup(s) so it returns a brand-new heap string holding the same charac...
medium○ Not Started
Pointers
Solve
457
Free It, Then NULL ItRead an integer n. Allocate n ints on the heap and set element i to (i + 1) * 10...
medium○ Not Started
Pointers
Solve
458
Deep Copy a Player with a char* NameThe Player struct is provided. Write: - make_player(name, score): allocate a Pl...
medium○ Not Started
Pointers
Solve
459
Array of Pointers to Heap WordsRead an integer n, then n words. Allocate an array of n char* on the heap, give ...
medium○ Not Started
Pointers
Solve
460
Multiplication Grid Through an int Double PointerBuild a two-dimensional grid on the heap using a double pointer (`int **`): an a...
medium○ Not Started
Pointers
Solve
461
Row-Major Matrix in One malloc BlockStore the whole matrix in a SINGLE block of `rows * cols` ints and index it row-...
medium○ Not Started
Pointers
Solve
462
Allocate a Label Through a char ** Out-ParameterComplete this function (the signature is given and must not change): void make_...
medium○ Not Started
Pointers
Solve
463
Transform an Array Through a Callback PointerThe function `triple` is already written for you. Complete this function (the si...
medium○ Not Started
Pointers
Solve
464
Arithmetic Dispatch Table of Function PointersThe four operations and their names are already written for you. Build a dispatc...
medium○ Not Started
Pointers
Solve
465
qsort Scores From High to LowWrite a `qsort` comparator that sorts DESCENDING (largest first), then in `main`...
medium○ Not Started
Pointers
Solve
466
Three-Node Chain Built With mallocBuild a three-node singly linked list whose nodes live on the HEAP, walk it once...
medium○ Not Started
Pointers
Solve
467
Reverse an Array With Two Walking PointersReverse an array in place using TWO POINTERS instead of indexes. Do not build a ...
medium○ Not Started
Pointers
Solve
468
Count Matches With a Pointer WalkScan an array with a MOVING POINTER rather than an index. Read an integer `n` (...
medium○ Not Started
Pointers
Solve
469
Sorted Insert Into a Linked ListBuild a singly linked list that is kept in ascending order the whole time you ar...
hard○ Not Started
Pointers
Solve
470
Reverse a Singly Linked List In PlaceRead an integer `n`, then `n` more integers, and build a singly linked list hold...
hard○ Not Started
Pointers
Solve
471
Growable Integer Stack with reallocWrite a stack of ints backed by ONE dynamically allocated array that doubles wit...
hard○ Not Started
Pointers
Solve
472
Append Numbers to a Linked List TailRead integers from standard input until the input runs out, appending each value...
hard○ Not Started
Pointers
Solve
473
Delete a Linked List Node by ValueRead an integer `n`, then `n` values, and build a singly linked list holding the...
hard○ Not Started
Pointers
Solve
474
Binary Search Tree Inorder Walk and FreeRead an integer `n`, then `n` values, and insert each one into a binary search t...
hard○ Not Started
Pointers
Solve
475
Heap Matrix Product with Full CleanupMultiply two matrices that you build yourself on the heap. No fixed-size arrays,...
hard○ Not Started
Pointers
Solve
476
Generic Byte Swap with void Pointers and memcpyWrite one swap function that works for any type, then use it on three of them. ...
hard○ Not Started
Pointers
Solve
477
Growable Score Roster with realloc and Owned NamesThe struct is given to you: typedef struct { char *name; int score; } E...
hard○ Not Started
Pointers
Solve
478
Ragged Row Table on the HeapRead an integer n, the number of rows. Then, for each row, read its length k fol...
hard○ Not Started
Pointers
Solve
479
Deep Copy a Heap Hero RecordThe struct is given to you: typedef struct { char *name; int level; } H...
hard○ Not Started
Pointers
Solve
480
Split a Line into a Heap Token ArraySplit one line of text into words and store them in a char ** where every elemen...
hard○ Not Started
Pointers
Solve