Hirdetés
- sziku69: Szólánc.
- sziku69: Fűzzük össze a szavakat :)
- f(x)=exp(x): A laposföld elmebaj: Vissza a jövőbe!
- Torda: Így lehet fillérekből prémium okosotthon rendszert építeni 2025-ben
- Toomy: FOXPOST: régen jó volt, de már jobban jársz, ha elfelejted
- Klaus Duran: Minden drágul. Vajon a fizetések 2026-ban követi minimálisan?
- Geri Bátyó: Agglegénykonyha 11 – Vörösboros marhaszelet
- droidic: Saját hálózat, saját szabályok – Építs profi infrastruktúrát!
- Luck Dragon: Asszociációs játék. :)
- btz: Internet fejlesztés országosan!
Ú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!
- AKCIÓ! Dell Latitude 5455 14 FHD+ üzleti notebook - Qualcomm X Plus X1 16GB DDR5 512GB SSD W11
- ÁRGARANCIA!Épített KomPhone i7 14700KF 32/64GB RAM RX 9070 XT 16GB GAMER PC termékbeszámítással
- Eladó Apple iPhone 15 Pro Max 256GB / Akku 90% / 12 hó jótállás
- RTX 5090-es, 5080-as stb... GAMER laptopok + dokkolók + licencek
- Új Steelseries Arctis Nova pro vezetékes gamer fejhallgató
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest

