Dr inż. Piotr Fabian

note /search

Assigning names to structure types

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

Assigning names to structure types typedef struct { float re, im; } tcompl; tcompl a, b, c; a.re = 10.5; a.im = 36.6; b = c = a; ...works like: struct compl { float re, im; }; struct compl a, b, c; a.re = 10.5; ... or: struct { float re, im; } a, b, c; ...

ASCII - omówienie zagadnienia

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

ASCII • The American Standard Code for Information Interchange • Acronym: ASCII • Pronounced: /'æski/ ASS-kee • A character-encoding scheme based on the ordering of the English alphabet • ASCII codes represent text in computers, communications equi...

Breaking loops - examples

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

Breaking loops • It is possible to exit from a loop in other way than by testing the condition • The break statement exits from for , while , and do (and switch ) • A break causes the innermost enclosing loop or switch to be exited immediately ...

All printf conversion specifications

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

A ll printf conversion specifications Character Argument type; Printed As d,i int; decimal number o int; unsigned octal number (without a leading zero) x,X int; unsigned hexadecimal number (withou...

Bit fields - omówienie zagadnienia

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

Bit-fields • Used to store variables smaller than one byte • Example: - a set of single-bit flags - interfaces to hardware devices • The usual way: masks, shifting, masking, ... • An alternative in C: bit-fields • A bit-field , or field : a set of...

C Compilers - examples

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

C/C++ compilers • Turbo C++ Explorer • Free Microsoft Visual C++ 2010 Express • Free Microsoft eMbedded Visual C++ • Free Microsoft .NET Framework Software Development Kit / Free Microsoft Visual C++ Compiler • Open

Constants - examples

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

Constants • An integer constant like 2345 is an int • long constant is written with a terminal l or L : 1L • Unsigned constants are written with a terminal u or U ( ul means unsigned long) • A leading 0 (zero) on an integer constant means octal • ...

Control flow while loop

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

Control flow: the while loop while (condition) { instruction(s) } • The condition in parentheses is tested. • If it is true , the body of the loop (statements enclosed in braces) is executed. • Then the condition is re-tested, and if true, the body is executed again. • When the test becomes false ,...

Counting digits - examples

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

Counting digits #include /* count digits, white space, others */ int main() { int c, i, n_white, n_other; int n_digit[10]; /* 10 counters for 10 digits */ n_white = n_other = 0; for (i = 0; i = '0' && c (…) …; printf("digits: "...