- AMD K6-III, és minden ami RETRO - Oldschool tuning
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- Hobby elektronika
- SONY LCD és LED TV-k
- Azonnali fotós kérdések órája
- Milyen billentyűzetet vegyek?
- Kormányok / autós szimulátorok topikja
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- 5.1, 7.1 és gamer fejhallgatók
- Nem szabad futtatni az új Red Magic csúcstelefonokon a 3DMarkot
Ú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!
- Spórolós topik
- ubyegon2: Airfryer XL XXL forrólevegős sütő gyakorlati tanácsok, ötletek, receptek
- Crimson Desert
- Xbox Series X|S
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Lalikiraly: Macbook NEO 2
- One otthoni szolgáltatások (TV, internet, telefon)
- Porszívók - akkus és klasszikus vezetékes
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- hcl: GPT diszk kisebbre klónozása
- További aktív témák...
- Lenovo ThinkPad W541,15.6,FHD,i7-4810MQ,32GB DDR3,256GB SSD,K1100 2GB VGA,WIN10
- Telefon felváráslás!! iPhone 15/iPhone 15 Plus/iPhone 15 Pro/iPhone 15 Pro Max
- Apple iPhone SE 2022 64GB, Kártyafüggetlen, 1 Év Garanciával
- Licencek
- AKCIÓ! Apple MacBook Air 13 M1 8GB RAM 256GB SSD notebook garanciával hibátlan működéssel
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

