Vai al contenuto principale
ProdottiStrumenti desktopTASTECADVisualizzazione disegniTASTEFILESGestione fileTASTEFTPTrasferimento fileTASTESSHSpazio di lavoro remotoTASTEZIPCompressione ed estrazioneTASTEWINMGestione fileStrumenti per sviluppatoriTASTECODEAmbiente di sviluppo integrato per RustTASTESTUDIOAmbiente integrato di sviluppo e testTASTEETLIntegrazione dati (ETL)ServerTASTEREMOTEServer di desktop remotoTASTEGEOServer geospazialeTASTEMAILSpazio di lavoro emailInvestimentiTASTESTOCKApp desktop di trading automatico azionarioIniziaDownloadDocumentazioneAcquistaTutti i prodotti
Marketplace
Notizie
TecnologiaNotizieNotizie di sviluppo di oggiDocumentazioneLinguaggi di programmazioneRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFramework frontend webNext.jsReactVue.js · NuxtSvelteKitAngularFramework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFramework per app e desktopTauriFlutterReact NativeElectronAlgoritmiBasi degli algoritmiAlgoritmi fondamentaliAlgoritmi avanzatiAlgoritmi pratici
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrinaGuida alla community
CollaboraTrasferimento tecnicoRealizzazione del sito webRealizzazione di app desktopPipeline di rilascio e pagamentoPartner commercialeContatti
ServiziDesktop remotoPacchetti di installazione su misura
TASTEDEV
Prodotti

Strumenti desktop

TASTECADApri con leggerezza anche i disegni più complessiTASTEFILESSolo i file che servono, alla massima velocitàTASTEFTPLa via più ordinata per i tuoi fileTASTESSHUn legame più solido tra te e i tuoi serverTASTEZIPComprimi più veloce, estrai più sicuroTASTEWINMUn file manager a due pannelli pensato per la tastiera

Strumenti per sviluppatori

TASTECODEModifica, compila, esegui il debug e testa app Rust in un'unica finestraTASTESTUDIODalla modifica ai test remoti e alle correzioni IA approvateTASTEETLSposta i dati guardando i valori

Server

TASTEREMOTEUn desktop remoto che gira sul tuo serverTASTEGEOUn server geospaziale compatibile con GeoServer, ricostruito in RustTASTEMAILRiprendi il controllo della tua posta

Investimenti

TASTESTOCKTrading automatico azionario secondo le regole che decidi tu: quando e che cosa

Inizia

DownloadUltime versioni di ogni prodottoDocsCome usare ogni prodottoAcquistaAbbonamenti e licenze perpetueTutti i prodottiTutti i prodotti a colpo d’occhio
Tutti i prodotti
MarketplaceNotizie
Tecnologia

Notizie

Notizie di sviluppo di oggiAnnunci ufficiali su linguaggi, framework, GitHub e IADocumentazioneGuide a linguaggi, framework e algoritmi

Linguaggi di programmazione

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Framework

Framework frontend webNext.jsReactVue.js · NuxtSvelteKitAngular
Framework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Framework per app e desktopTauriFlutterReact NativeElectron

Algoritmi

Basi degli algoritmiAnalisi della complessità · Ordinamento · Ricerca · Strutture dati di base · Alberi e heapAlgoritmi fondamentaliVisita dei grafi · Cammini minimi e alberi ricoprenti · Programmazione dinamica · Algoritmi greedy · Divide et impera · BacktrackingAlgoritmi avanzatiAlgoritmi sulle stringhe · Matematica e teoria dei numeri · Manipolazione dei bit · Alberi di segmenti · Union-FindAlgoritmi praticiStrategia per colloqui di programmazione · Cache LRU · Rate limiting · Hashing consistente
Tutta la documentazione di sviluppo
Community
ProgettiScopri sviluppatori e lavoriLog di sviluppoDecisioni e lezioni appresePromptIstruzioni riutilizzabiliProblemi degli strumenti di IAProblemi e alternative di Claude, Codex, GeminiVetrinaRisultati completatiGuida alla communityCome sviluppiamo in modo aperto
Collabora
Trasferimento tecnicoApp native in Rust ed eguiRealizzazione del sito web10 lingue, account, documentazione e downloadRealizzazione di app desktopRust ed egui, senza WebViewPipeline di rilascio e pagamentoFirma, MSI, deb, rpm, AppImage, hashPartner commercialeConsigliaci e ricevi il 30%ContattiSviluppo, partnership e investimenti
Servizi
Desktop remotoRaggiungi il tuo computer dal browserPacchetti di installazione su misuraSolo il necessario, impostazioni precaricate
Acquista
IT
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Accedi
Accedi
TASTEDEV

Dai piccoli strumenti a uno sviluppo migliore.

support@tastedev.netSostieni TASTEDEV
ProdottiGamma di prodottiAcquistaDocsDownloadMarketplaceAssistenza
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrina
NormeChi siamoInformativa sulla privacyTermini di servizioCondizioni di abbonamentoRimborsiLinee guida della community
AccountAccediRegistrati
Visitatori
Oggi
Ieri
Visualizzazioni totali
Società
GXSOFT
Rappresentante
CHOI YOUNG GU
Numero di registrazione
853-44-00368
Indirizzo
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefono
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsabile privacy
CHOI YOUNG GU

© 2026 TASTEDEVLe informazioni sui prodotti si basano su fonti di sviluppo verificate.Rilasciato · in miglioramento

Documentazione di C
C
Getting StartedSyntax BasicsTypes and DataModules and LibrariesErrors and TestingKey Concepts: Pointers and Memory
Discussioni

Guida a C · 1/6

Getting Started

Per ora questo capitolo è disponibile solo in inglese.

C sits underneath a huge amount of software: operating system kernels, embedded firmware, databases, and the runtimes of many other languages. It is a compiled language, so the workflow is always the same: write source files, hand them to a compiler, and run the native executable it produces. This chapter gets a compiler onto your machine, builds a first program, turns on the warnings you want, and looks at what actually happens during a build.

Installing a compiler

There are three mainstream C compilers: GCC, Clang, and Microsoft's MSVC. Standard C code builds with any of them, so pick whichever is easiest to get on your platform.

PlatformTypical compilerHow to install
Ubuntu / DebianGCCsudo apt install build-essential
FedoraGCCsudo dnf install gcc make
macOSClangxcode-select --install (Command Line Tools)
WindowsMSVCVisual Studio or Build Tools with the "Desktop development with C++" workload
WindowsGCCMSYS2, installing the GCC package for the UCRT64 environment

Confirm the compiler is on your PATH:

gcc --version
clang --version
# MSVC: run inside a "Developer Command Prompt"
cl

MSVC needs a set of environment variables that plain terminals do not have, so use the Developer Command Prompt (or Developer PowerShell) that Visual Studio installs.

Your first program

Save this as hello.c:

#include <stdio.h>

int main(void) {
    printf("Hello, C!\n");
    return 0;
}

The #include line pulls in the declarations for the standard I/O functions. Every program starts executing in main, and the value it returns becomes the process exit status, where 0 means success.

Build and run it:

# GCC or Clang
gcc -std=c17 -Wall -Wextra -g hello.c -o hello
./hello
echo $?    # prints the exit status, 0

# MSVC (Developer Command Prompt)
cl /std:c17 /W4 hello.c
hello.exe

-o hello names the output; without it GCC and Clang write a.out. -std=c17 pins the language standard so you are not relying on whatever default the compiler picked, and -g embeds debug information for tools like GDB or LLDB. Add an optimization level such as -O2 for release builds.

Turn the warnings up

Domande su questo capitolo?
Capitolo successivoSyntax Basics

Out of the box, C compilers accept a lot of code that is almost certainly wrong. Enabling warnings costs nothing and catches real bugs, so make it a habit from day one.

  • -Wall enables a broad set of common-mistake warnings. Despite the name, it is not every warning.
  • -Wextra adds more checks on top, such as unused parameters.
  • -Wpedantic flags compiler extensions that are not part of standard C.
  • -Werror turns warnings into errors, which is handy in CI so warnings never pile up.
  • On MSVC, /W4 is the rough equivalent and /WX treats warnings as errors.

This program compiles, but it contains two mistakes:

#include <stdio.h>

int area(int width, int height) {
    return width * width;   /* height is never used */
}

int main(void) {
    printf("%d\n", 3.5);    /* passes a double to %d */
    return area(2, 3) == 4 ? 0 : 1;
}

With -Wall -Wextra, the compiler reports the format/argument mismatch in printf and the unused height parameter. Without warnings, you would only find out at run time through a nonsensical value.

What a build really does

That single gcc hello.c -o hello command runs four stages in sequence:

  1. Preprocessing: pastes in #include files, expands #define macros, and resolves #if conditionals.
  2. Compilation: translates the preprocessed C into assembly. Syntax errors and most warnings come from here.
  3. Assembly: turns assembly into an object file (.o, or .obj on Windows) containing machine code.
  4. Linking: combines object files and libraries into an executable. "undefined reference" errors come from this stage.

You can stop after each stage and inspect the output:

gcc -E hello.c -o hello.i   # preprocessed source
gcc -S hello.i -o hello.s   # assembly
gcc -c hello.s -o hello.o   # object file
gcc hello.o -o hello        # link

Real projects compile each source file to an object file with -c and link them all at the end. Only files that changed need recompiling, which keeps builds fast. Chapter 4 builds on this with Make and CMake.

Summary

  • Install GCC, Clang, or MSVC and verify it with --version.
  • Execution starts in main; returning 0 signals success.
  • Build with -std=c17 -Wall -Wextra (or /W4 on MSVC) so the compiler catches mistakes early.
  • A build is preprocess, compile, assemble, link. Knowing which stage produced an error tells you where to look.

0 commenti

Commenti principaliPrima i più recenti

Accedi · Accedi per lasciare un commento.