- "Titkos termékek" is várhatók a Pixel 10 széria bemutatóján
- Samsung Galaxy S21 FE 5G - utóirat
- Samsung Galaxy S21 Ultra - vákuumcsomagolás
- Telekom mobilszolgáltatások
- Megjött Magyarországra a legnagyobb akkuval szerelt Redmi
- iPhone topik
- Xiaomi Mi 8 - így csinálunk csúcsmodellt Mi
- Okosóra és okoskiegészítő topik
- Google Pixel topik
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
Ú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!
- Xiaomi Redmi Note 13 Pro+ 5G 512GB 12GB RAM - 2027. FRBRUÁRIG GARANCIÁS / akár beszámítással is
- ÚJ Lenovo LOQ 15ARP9 - 15.6" FullHD IPS 144Hz - Ryzen 7 7435HS - 24GB - 512GB - RTX 4050 - 2 év gari
- LG OLED42C44LA 2 Év Gyári Garancia
- LG OLED65B49LA 2 Év gyári Garancia
- Kingston FURY 64GB KIT DDR4 3200MHz CL16 Beast Black
- GYÖNYÖRŰ iPhone 12 mini 64GB Black -1 ÉV GARANCIA - Kártyafüggetlen, MS2954
- Microsoft Surface Pro 6 i5-8350U 8GB 256GB 1 év garancia
- GYÖNYÖRŰ iPhone 13 Pro 128GB Graphite -1 ÉV GARANCIA - Kártyafüggetlen, MS2980
- Bomba ár! Lenovo ThinkPad T480s - i7-8GEN I 16GB I 256GB I 14" WQHD I HDMI I Cam I W11 I Gari!
- Bomba ár! Lenovo IdeaPad V330-15IKB: i7-8G I 8GB I 256SSD I 15,6" FHD I Cam I W11 I Garancia!
Állásajánlatok
Cég: FOTC
Város: Budapest