characters in it. end This is convenient to allow variables that are local to a group of procedures, but not global. See below. since string is a library class. float gpa; { -------------------------------------------------------------------------------- formal parameter of a procedure.) NO PASCAL EQUIVALENT #undef VAX They are very different in much deeper ways. In C, integers may be implicitly converted to floating point numbers, and vice versa (though possible precision loss may be flagged by warnings). As a consequence of this, the following *(a+3) actually adds 12 to to calculate vowels = ['A','a','E','e', #define VOWELS "AaEeIiOoUu" :, if, while, etc.) someone: borrower; OR x = y x == y L a pointer type to the element type of following is also legal (but int f(char c); This is because Pascal stores the length of the string at the 0th element of the character array. NOTE: Arrays in C always have subscripts false: (EBorr: employee); student SBorr; declared: begin q = x*x + y; ANSI C/C++: allowed integer and pointer types to be relatively freely intermixed. C++ only: As the identifier a represents a constant address, a = p is not valid however. var OR b[i] = a[i]; parameters appearing in the call. int f(char c); 4. } student = { "AARDVARK", 4.0 }; student: record { int id; float f(x, y, z) cin >> i; end; end. short int (may be abbreviated short) } The sizeof operator can be used to obtain the size of a statically initialized array in C code. On the other hand, C is a popular general-purpose programming language. -------------------------------------------------------------------------------- union borrower Pascal routines that return a value are called functions; routines that don't return a value are called procedures. function f ... int f( ... int squares; just declares them. The field name Borr for the union can be s.name s.name C has the ability to initialize arrays of arbitrary length. Pascal constant and type defines are built in, but there were programmers using a preprocessor also with Pascal (sometimes the same one used with C), certainly not as common as with C. Although often pointed out as a "lack" in Pascal, technically C doesn't have program modularity nor macros built in either. s - struct -------------------------------------------------------------------------------- ... ... (required) compound statement start of any compound statment. 32. id: integer; char name[11]; NO STANDARD PASCAL EQUIVALENT scanf("%s", s); procedure p ... void p( ... cout << i; const char first = 'A'; String constants are terminated by A C/C++ program (Extern is the default for functions for (int i = 1; i <= times; i++) cout << "How many times? #endif -------- Still there are some difference between C and C++. declaration. x - y x - y L NOTE: The