Hirdetés
- Luck Dragon: Asszociációs játék. :)
- GoodSpeed: Norton 360 Premium: 75GB Cloud PC Backup for 10 Devices 14.99€-ért? Igen!
- NASsoljunk: ZyXEL NSA-310 és az FFP
- sziku69: Fűzzük össze a szavakat :)
- sziku69: Szólánc.
- Magga: PLEX: multimédia az egész lakásban
- bambano: Bambanő háza tája
- Lalikiraly: Kaáli Autó-Motor Múzeum
- Lenry: Windows 11 telepítése inkompatibilis gépre
- Parci: Milyen mosógépet vegyek?
Ú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!
- Hivatalos a OnePlus 13 startdátuma
- Filmvilág
- eMAG vélemények - tapasztalatok
- Luck Dragon: Asszociációs játék. :)
- Call of Duty: Black Ops 7
- Intel Core Ultra 3, Core Ultra 5, Ultra 7, Ultra 9 "Arrow Lake" LGA 1851
- Milyen légkondit a lakásba?
- Mibe tegyem a megtakarításaimat?
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Gaming notebook topik
- További aktív témák...
- GYÖNYÖRŰ iPhone 12 Mini 64GB Blue-1 ÉV GARANCIA - Kártyafüggetlen, MS3658, 100% Akkumulátor
- GYÖNYÖRŰ iPhone 12 mini 128GB Black -1 ÉV GARANCIA - Kártyafüggetlen, MS3878, 100% Akksi
- Xiaomi Poco M7 Pro 256,Újszerű,Dobozával,12 hónap garanciával
- Sony WH-1000XM5 zajszűrős fejhallgató
- Motorola Edge 40 / 8/256 GB / Kártyafüggetlen / 12Hó Garancia
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest

