- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Monitor hiba topik
- Kötelező frissítésnek számít a Microsoft legújabb csomagja a Windows 11-hez
- Bluetooth hangszórók
- Házimozi belépő szinten
- Milyen TV-t vegyek?
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- Hobby elektronika
- Fejhallgató erősítő és DAC topik
- Táp is jár a Chieftec helytakarékos mikrotornyához
Ú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!
- Parfüm topik
- Sweet.tv - internetes TV
- Star Trek
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Le Mans Ultimate
- Monitor hiba topik
- Xiaomi 15T - reakció nélkül nincs egyensúly
- Kötelező frissítésnek számít a Microsoft legújabb csomagja a Windows 11-hez
- A fociról könnyedén, egy baráti társaságban
- LED világítás a lakásban
- További aktív témák...
- GYÖNYÖRŰ iPhone 12 Pro Max 128GB Pacific Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3938
- -60% Bontatlan ÚJ Lenovo Thinkpad T14 gen5 Ultra 7 155U 16GB Ram 512GB SSD Magyar bill 1 év Gari
- Dell Precision 7550,15.6",FHD,i7-10850H,16GB DDR4,512GB SSD,Quadro T2000 4GB VGA,WIN11, 2 KAMERA
- ÁRGARANCIA!Épített KomPhone Ryzen 5 5600X 16/32/64GB RAM RTX 5060 8GB GAMER PC termékbeszámítással
- Synology DS120j NAS
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

