Hirdetés
- bobalazs: i5 4690 + RX 460 HTPC
- Zolii21: 2HB Informatika - Ernő vélemények
- MasterDeeJay: Egy nem átlagos Asus videókártya (GTX950M 2GB GDDR3)
- Magga: PLEX: multimédia az egész lakásban
- gban: Ingyen kellene, de tegnapra
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Luck Dragon: Asszociációs játék. :)
- Négymagos Xeon(!) CPU LGA775-ös deszkában
- hmzs: Fujitsu Futro S920 csúcsra járatva
- gerner1
Ú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!
- Folyószámla, bankszámla, bankváltás, külföldi kártyahasználat
- Revolut
- Az Intel szerint mindenkit érint, illetve érinteni fog a CPU-hiány
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- PlayStation 5
- bobalazs: i5 4690 + RX 460 HTPC
- Motorola Edge 50 Neo - az egyensúly gyengesége
- Xbox Series X|S
- Gitáros topic
- Motorolaj, hajtóműolaj, hűtőfolyadék, adalékok és szűrők topikja
- További aktív témák...
- Dell Vostro 3425 6magos Ryzen 5 5625U 16GB RAM 512GB SSD 1 év garancia
- 236 - Lenovo Legion Pro 7 (16IRX9H) - Intel Core i9-14900HX, RTX 4090
- PXN V9 Gen 2 Kormány+Pedál+Váltó BONTATLAN!
- Azonnali készpénzes AMD Ryzen 1xxx 2xxx 3xxx 5xxx processzor felvásárlás személyesen / csomagküldés
- Apple iPhone 15 Pro Max 256 GB White Titanium 1 év Garancia Beszámítás Házhozszállítás
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
