- erkxt: A Roidmi becsődölt – és senki nem szól egy szót sem?
- Magga: PLEX: multimédia az egész lakásban
- Luck Dragon: Asszociációs játék. :)
- droidic: Így beszélhetsz élő emberrel EA supportban
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- sziku69: Fűzzük össze a szavakat :)
- Elektromos rásegítésű kerékpárok
- sziku69: Szólánc.
- MasterDeeJay: Noname 1TB-os SATA SSD teszt
- hcl: MS Office365 Linuxon
Ú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!
- PlayStation 4/5 kontroller analóg cseréje HALL TMR érzékelősre, 1 év garancia!!! Nincs többé drift!!
- PlayStation 5/4 kontroller analóg cseréje HALL TMR érzékelősre, 1 év garancia!!! Nincs többé drift!!
- XBOX ONE/Series kontroller analóg cseréje HALL TMR érzékelősre, 1 év garancia!!! Nincs többé drift!!
- XBOX Series S 512GB, 6 hó garanciával Bp-i üzletből eladó!
- Dell Latitude 5400 / i5-8365u / 8Gb DDR4 / 256Gb SSD / FHD IPS / Excellent akku
- Telefon felvásárlás!! Samsung Galaxy A13/Samsung Galaxy A33/Samsung Galaxy A53
- Bomba ár! Fujitsu LifeBook U757 - i3-7GEN I 16GB I 256SSD I 15,6" FHD I HDMI I Cam I W11 I Garancia!
- 130+131+132+133 - Lenovo Legion Pro 7 (16IRX9H) - Intel Core i9-14900HX, RTX 4080
- 118 - Lenovo Legion Pro 5 (16ARX8) - AMD Ryzen 9 7945HX, RTX 4070 - UK billentyűzet
- TP-Link Archer C1200 Router eladó (1200 Mb/s Wi-Fi)
Állásajánlatok
Cég: PC Trade Systems Kft.
Város: Szeged
Cég: CAMERA-PRO Hungary Kft
Város: Budapest