Hirdetés
- Milyen billentyűzetet vegyek?
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Melyik tápegységet vegyem?
- Házimozi belépő szinten
- Házimozi haladó szinten
- AMD GPU-k jövője - amit tudni vélünk
- Milyen videókártyát?
- OLED TV topic
- Kompakt vízhűtés
- Pánikban a világ a Radeon RX 5000 és 6000 sorozat támogatása miatt
Ú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!
- Elektromos autók - motorok
- Milyen billentyűzetet vegyek?
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- sziku69: Szólánc.
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
- Bemutatta a Huawei a Band 10 okoskarkötőt
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Bittorrent topik
- Mercedes topic
- Kerékpárosok, bringások ide!
- További aktív témák...
- Bontatlan! Új Lenovo Thinkpad T14 G5 Tartós Üzleti Laptop 14" -45% Ultra 7 165U 16/512 FHD+ Magyar!
- Bomba Ár! Fujitsu LifeBook E751 - i5-2GEN I 4GB I 500GB I DVDRW I 15,6" HD I Cam I W10 I Gari!
- Bomba ár! Dell Latitude E6440 - i5-4GEN I 8GB I 256SSD I 14" HD I HDMI I Cam I W10 I Garancia!
- Bomba ár! Dell Latitude E6540 - i5-4GEN I 8GB I 500GB I HDMI I 15,6" HD I Cam I W10 I Garancia!
- Bomba Ár! Lenovo ThinkPad E15 G4 AMD - Ryzen 5 5625U I 8GB I 256SSD I 15,6" FHD I HDMI I W11 I Gari
- AZONNALI SZÁLLÍTÁSSAL Eladó Windows 8 / 8.1 Pro
- GYÖNYÖRŰ iPhone 14 Pro Max 128GB Space Black -1 ÉV GARANCIA - Kártyafüggetlen, MS2998, 100% Akksi
- AKCIÓ! ASUS ROG G16 (2025) G615LR 16 - Ultra 9 275HX 32GB DDR5 1TB SSD RTX 5070Ti 12GB WIN11
- Telefon felváráslás!! Xiaomi 13T, Xiaomi 13T Pro, Xiaomi 14T, Xiaomi 14T Pro
- Xiaomi Redmi Note 14 Pro+ / 8/256GB / Kártyafüggetlen / 12Hó Garancia
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


