Hirdetés
- OLED TV topic
- NVIDIA GeForce RTX 3080 / 3090 / Ti (GA102)
- Sony MILC fényképezőgépcsalád
- Milyen alaplapot vegyek?
- Milyen HASZNÁLT notebookot vegyek?
- Gaming notebook topik
- Milyen belső merevlemezt vegyek?
- HiFi műszaki szemmel - sztereó hangrendszerek
- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- TCL LCD és LED TV-k
Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
válasz
Szőkecica
#2419
üzenetére
#include <stdio.h>
int main()
{
int bytes_read;
int nbytes = 100;
char *my_string;
puts ("Please enter a line of text.");
/* These 2 lines are the heart of the program. */
my_string = (char *) malloc (nbytes + 1);
bytes_read = getline (&my_string, &nbytes, stdin);
if (bytes_read == -1)
{
puts ("ERROR!");
}
else
{
puts ("You typed:");
puts (my_string);
}
return 0;
}"The getline function reads an entire line from a stream, up to and including the next newline character. It takes three parameters. The first is a pointer to a block allocated with malloc or calloc. (These two functions allocate computer memory for the program when it is run. See Memory allocation, for more information.) This parameter is of type char **; it will contain the line read by getline when it returns. The second parameter is a pointer to a variable of type size_t; this parameter specifies the size in bytes of the block of memory pointed to by the first parameter. The third parameter is simply the stream from which to read the line."
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- OLED TV topic
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- EA Sports WRC '23
- NVIDIA GeForce RTX 3080 / 3090 / Ti (GA102)
- Sony MILC fényképezőgépcsalád
- Apple Watch
- Teljes verziós játékok letöltése ingyen
- PlayStation 5
- Konzolokról KULTURÁLT módon
- Telekom mobilszolgáltatások
- További aktív témák...
- SNES Edge Sharpener (Enhancer) modkit
- ÚJ GIGABYTE A16 3VH - 16" WUXGA 165Hz - Ryzen 7 260 - 16GB - 1TB - Win11 - RTX 5060 - 3 év garancia
- Dell Latitude FHD IPS Intel core i5-1345u 16GB DDR4 256gb SSD WIN11
- Surface STUDIO AIO PC 28col 4k TOUCH / Intel i7 /32gb ram / 512NvMe + 1TB / NVIDIA 4gb dedikált
- Asztali Gamer Gép Garanciális Ryzen 7-7800x3d 4070 Super
- Krups EA81 Automata kávégép 6 hónap Garancia Beszámítás Házhozszállítás
- Samsung Galaxy S22 128GB,Átlagos,Adatkabel,12 hónap garanciával
- GYÖNYÖRŰ iPhone 13 Pro Max 128GB Graphite -1 ÉV GARANCIA - Kártyafüggetlen, MS3063, 100% Akksi
- AZONNALI SZÁLLÍTÁSSAL Eladó Windows 8 / 8.1 Pro
- Bomba ár! Lenovo ThinkBook 13s-IML - i5-10210U I 8GB I 256SSD I 13,3" FHD I Cam I W11 I Gari!
Állásajánlatok
Cég: NetGo.hu Kft.
Város: Gödöllő
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


