- Yettel topik
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Android alkalmazások - szoftver kibeszélő topik
- VoLTE/VoWiFi
- Xiaomi 15T Pro - a téma nincs lezárva
- Külföldi prepaid SIM-ek itthon
- iPhone topik
- Milyen okostelefont vegyek?
- Motorola Edge 70 - többért kevesebbet
- Samsung Galaxy A54 - türelemjáték
Ú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!
- És akkor a memóriapánik után beköszöntött a HDD-pánik
- Yettel topik
- AMD Ryzen 9 / 7 / 5 9***(X) "Zen 5" (AM5)
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Kerékpárosok, bringások ide!
- Milyen egeret válasszak?
- Kedvenc zene a mai napra
- Android alkalmazások - szoftver kibeszélő topik
- LEGO klub
- Bittorrent topik
- További aktív témák...
- Lenovo ThinkPad P53 i7-9850H 32GB RAM 256GB NVMe Quadro T2000
- HP ProBook 640 G8 laptop, i3-1115G4, ajándék egér és táska
- Lenovo ThinkPad X13 G2 13.3" -50% AMD Ryzen 5 Pro 5650U Hexa-core 16GB 512GB SSD FHD
- Gaming PC - R5 9600X,RTX 5070 12GB,32GB DDR5,1TB NVMe,850W
- Ultra PC - R7 7800X3D,RTX 5080 16GB,32GB DDR5,1TB NVMe,1200W
- GYÖNYÖRŰ iPhone 14 Pro 128GB Space Black -1 ÉV GARANCIA - Kártyafüggetlen, MS4022
- Xiaomi Redmi Note 14 Pro+ / 8/256GB / Kártyafüggetlen
- GYÖNYÖRŰ iPhone 14 Pro Max 256GB Space Black-1 ÉV GARANCIA - Kártyafüggetlen, MS4149
- Dell Latitude 7490 14" FHD IPS, i5 - i7, 16GB RAM, SSD, jó akku, számla, 6 hó gar
- iking - Apple iPhone 14 Pro Graphite ProMotion 120 Hz, 48 MP kamera, Dynamic Island 128 GB
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest


