Why do some functions return to main() with a newline, even though I am using getchar() to get rid of it?

Is there perhaps some other, better way to do it? Perhaps one with which clang doesn’t give me “unused result” warnings?

MODS: If you deem it inappropirate for me to continuously ask for guidance here, please let me know. 😊

#include <stdio.h> void executechoice(int choice); void printsavedpins(int pin_storage[]); void promptnewpin(void); void checkpinlength(int pin); void checkpinmatch(int pin); void updatepinstorage(int pin); int pin = 0; int pin_storage[10] = {0}; int storage_index = 0; const int storage_limit = 10; //Prompt user for action. int main() { int choice = 0; printf("What would you like to do? (V)iew your saved pins, (S)ave a new pin or (E)xit? "); while ((choice = getchar()) != EOF) { getchar(); //clang gives 'unused result' warning but '\n' needs to be removed. if (choice == 'E' || choice == 'e') { break; } else { executechoice(choice); getchar(); //clang gives 'unused result' warning but '\n' needs to be removed. printf("What would you like to do next? (V)iew your saved pins, (S)ave a new pin or (E)xit? "); } } printf("Goodbye!\n"); return 0; } //Function definitions void executechoice(int choice) { if (choice == 'V' || choice == 'v') { printsavedpins(pin_storage); } else if (choice == 'S' || choice == 's') { promptnewpin(); } else { printf("Invalid choice! What would you like to do? (V)iew your saved pins, (S)ave a new pin or (E)xit? "); } } void printsavedpins(int pin_storage[]) { for (int i = 0; i < storage_limit; i++) printf("Pin %d: %d\n", i + 1, pin_storage[i]); } void promptnewpin(void) { printf("Enter new pin: "); scanf("%d", &pin); checkpinlength(pin); } void checkpinlength(int pin) { if (pin < 1000*100) { printf("Pin has to be at least six digits!\n"); promptnewpin(); } else checkpinmatch(pin); } void checkpinmatch(int pin) { int check = 0; printf("Verify your new pin: "); scanf("%d", &check); if (check != pin) { printf("Mismatch! "); promptnewpin(); } else updatepinstorage(pin); } void updatepinstorage(int pin) { pin_storage[storage_index] = pin; storage_index++; if (storage_index >= storage_limit) { storage_index = 0; } printf("New pin saved successfully!\n"); }
‘Evil Dead Burn’ Trailer: Deadites Take Over Family Gathering In New Line Franchise’s Latest

'Evil Dead Burn's first trailer, released on Tuesday, sees Deadites take over a family gathering, leading a woman to grapple with a reunion from hell.

Deadline
The Warner Bros. presentation at CinemaCon in Las Vegas on Tuesday offered a glimpse at the upcoming "Lord of the Rings: The Hunt for Gollum" Directed by original Gollum star Andy Serkis, the return to Middle-earth has a Dec. 17, 2027 release date. #thehuntforgollum #andyserkis #lordoftherings #warnerbros #newline #jrrtolkien
https://www.animationmagazine.net/2026/04/warner-bros-teases-dec-2027s-lord-of-the-rings-the-hunt-for-gollum-at-cinemacon/
Warner Bros. Teases Dec. 2027's 'Lord of the Rings: The Hunt for Gollum' at CinemaCon | Animation Magazine

The Warner Bros. presentation at CinemaCon in Las Vegas on Tuesday proved to be a treasure trove of new information about the upcoming feature Lord of the Rings: The Hunt for Gollum. Directed by original Gollum star Andy Serkis, the return to Middle-earth has a Dec. 17, 2027 release date. At the exhibitors’ event, attendees […]

Animation Magazine

‘Evil Dead Burn’ Bloody First Footage From Warner Bros., “Family Is The Root Of All Evil” – CinemaCon
#News #CinemaCon #EvilDeadBurn #NewLine #SébastienVaniček #WarnerBros

https://deadline.com/2026/04/evil-dead-burn-first-look-new-line-sebastien-vanicek-1236860360/

‘Evil Dead Burn’ Bloody First Footage From Warner Bros., “Family Is The Root Of All Evil” – CinemaCon

'Evil Dead Burn,' Sébastien Vaniček's entry in the New Line horror franchise, was previewed at CinemaCon on Tuesday night.

Deadline

Stephen Colbert Set To Write Next ‘Lord Of The Rings’ Movie After ‘The Hunt For Gollum’ Based On “Fog On The Barrow-Downs” Chapter
#News #Lordoftherings #NewLine #StephenColbert

https://deadline.com/2026/03/stephen-colbert-lord-of-the-rings-1236764923/

Stephen Colbert Set To Write Next ‘Lord Of The Rings’ Movie After ‘The Hunt For Gollum’ Based On “Fog On The Barrow-Downs” Chapter

'Late Show' host has a gig after leaving the CBS latenight show: He's adapting the next 'Lord of the Rings' movie.

Deadline
Beste Laufschuhe 2022: Das sind die beliebtesten Modelle und Marken | SPORTS INSIDER

Beste Laufschuhe 2022: Das sind die beliebtesten Modelle und Marken Schon im letzten Jahr war ich ganz überrascht, wie sehr die eigene Wahrnehmung durch

SPORTS INSIDER BLOG

How to Avoid CSV Newline Bugs on Windows

Missing newline='' adds blank rows in CSV output.

#python #csv #newline #windowsbug #howto

https://www.youtube.com/watch?v=tQCSlYvHs8I

How to Avoid CSV Newline Bugs on Windows #windowsbug

YouTube

Is it a plane, a bird, a train, a bus?!? Saitama - New Shuttle (yes, someone was creative with the name) is supposedly a train (according to the English announcement), but somehow the tracks are missing ;)

https://en.wikipedia.org/wiki/New_Shuttle

#japan #saitama #newline #bustrain

*edit* correct name New Shuttle - not New Line + added Link to wikipedia