Printf - strona 3

note /search

Memcpy

  • Politechnika Śląska
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 833

[] = "abcdefghijlkmnopqrstuvwxyz0123456709"; char *ptr; printf("destination before memcpy: %s\n", dest); ptr = (char *) memcpy(dest, src...

Random numbers

  • Politechnika Śląska
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 595

to RAND_MAX  Example: #include #include int main() { int i; printf("Ten random numbers...

Materiały do zaliczenia - Linux

  • Akademia Górniczo-Hutnicza im. Stanisława Staszica w Krakowie
  • Systemy operacyjne
Pobrań: 105
Wyświetleń: 728

i; for (i = 0; i < 5; ++i) { sleep (1); printf (“dupa\n”); }; }; main () { pthread_t watek...

Arithmetic operators

  • Politechnika Śląska
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 427

) || year%400 == 0) printf("%d is a leap year\n", year); else printf("%d is not a leap year\n", year...

Character counting 2nd

  • Politechnika Śląska
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 476

*/ int main() { long nc; for (nc = 0; getchar() != EOF; nc++) ; /* an empty body of the loop! */ printf...

Character counting - examples

  • Politechnika Śląska
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 343

() { long nc; /* used as a counter */ nc = 0; while (getchar() != EOF) nc++; printf("%ld\n", nc); return 0; } ...

Formatted input and output

  • Politechnika Śląska
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 469

Formatted input and output • fscanf and fprintf • Similar to scanf and printf • The first argument...

Pointers memory - overview

  • Politechnika Śląska
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 448

Pointers - accessing memory int x; pti = &x; x = 6; *pti = *pti + 1; /* now x is 7 */ x++; printf...