Hirdetés
- OLED TV topic
- AMD Navi Radeon™ RX 9xxx sorozat
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Adatmentés - HDD - SSD - Flash
- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- Videós, mozgóképes topik
- Amlogic S905, S912 processzoros készülékek
- Milyen asztali (teljes vagy fél-) 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!
- Vadiúj számlás garanciás szupergyors hálókártya
- iPhone 12 mini 128GB Black -1 ÉV GARANCIA - Kártyafüggetlen, MS3460, 94% Akkumulátor
- BESZÁMÍTÁS! MSI B450 R7 5800X 32GB DDR4 512GB SSD RX 6800 16GB ZALMAN Z1 Plus A-DATA 750W
- Azonnali készpénzes Intel i3 i5 i7 i9 12/13/14 gen processzor felvásárlás személyesen / csomagküldés
- GYÖNYÖRŰ iPhone 12 mini 128GB Blue-1 ÉV GARANCIA - Kártyafüggetlen, MS3462 96% Akkumulátor
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest