C: Pointers, Memory & Syntax
75 cards · 🇺🇸 English
Core C syntax, pointers, and manual memory management.
Study all 75 cards for free
Flashcards, quizzes, pixel-art games and a daily review that remembers for you.
Try the first 10 cards
1 / 10What was C originally developed for?
Tap the card for the answer · swipe right if you knew it, left if not
Already have an account? Sign in
Cards
- 1What was C originally developed for?Constructing utilities running on Unix and re-implementing the Unix kernel
- 2C's programming paradigmMulti-paradigm: imperative (procedural), structured
- 3C's type systemStatic, weak, manifest, nominal
- 4What language was C's successor to?B programming language (which was based on BCPL)
- 5Pointer in CA variable that stores the memory address of another variable
- 6Declare a pointerUse the * symbol: int *ptr;
- 7& operatorReturns the address of a variable (address-of operator)
- 8NULL in CA pointer value that points to nothing (typically 0 or ((void*)0))
- 9Primitive integer types in Cchar, short, int, long, and their unsigned variants
- 10Floating-point types in Cfloat, double, long double
- 11SizeofAn operator that returns the size (in bytes) of a data type or variable
- 12Allocate memory dynamicallyUse malloc(), calloc(), or realloc() from stdlib.h
- 13Free dynamically allocated memoryUse free(pointer)
- 14What happens if you don't free allocated memory?Memory leak - the memory remains allocated and unavailable until program termination
- 15Memory leakWhen allocated memory is not deallocated, causing the program to consume more memory over time
- 16Dangling pointerA pointer that points to memory that has been freed or is no longer valid
- 17Declare an arraytype name[size]; e.g., int arr[10];
- 18Are array indices 0-based or 1-based?0-based - first element is arr[0]
- 19Relationship between arrays and pointersArray name decays to a pointer to its first element; arr[i] is equivalent to *(arr + i)
- 20Can you assign one array to another?No, arrays cannot be copied or compared directly - must use loops or library functions like memcpy
- 21StructA user-defined data type that groups related variables of different types
- 22Access struct membersUse dot notation: structVar.member or arrow for pointers: structPtr->member
- 23UnionA data type where all members share the same memory location - only one member holds a value at a time
- 24EnumAn enumerated type that defines a set of named integer constants
- 25TypedefA keyword that creates an alias for a data type
- 26Does C have a boolean type?C99 added _Bool (with bool alias via stdbool.h). Before that, int was used (0=false, non-zero=true)
- 27Does C have a string type?No built-in string type - uses null-terminated character arrays (char arrays ending with \0)
- 28Main functionAn int value (0 typically indicates success, non-zero indicates error)
- 29Two standard main function signaturesint main(void) or int main(int argc, char *argv[])
- 30ArgcArgument count - the number of command-line arguments
And 45 more cards. Study the whole deck free
Articles about this deck
More Programming decks
See all- 🟣
C#: Fundamentals & .NET Core
99 cards · 🇺🇸 English
Core C# syntax, types, and .NET Core concepts in one deck.
- 🔵
C++: STL & OOP
59 cards · 🇺🇸 English
C++ Standard Template Library and object-oriented programming essentials.
- 🧱
Data Structures
95 cards · 🇺🇸 English
Arrays, linked lists, trees, graphs, hash tables and their core operations.
- 🌐
APIs: REST, GraphQL & HTTP Status Codes
108 cards · 🇺🇸 English
REST and GraphQL API concepts plus common HTTP status codes.
- 🎨
CSS: Box-Modell, Selektoren & Media Queries
129 cards · 🇺🇸 English
Das CSS-Box-Modell, Selektortypen, Media Queries und Animationen.
- ☕
Java: Core Concepts & OOP
73 cards · 🇺🇸 English
Core Java syntax and object-oriented programming fundamentals.
