CS 355 - Assignment 1 Due: Monday, July 23rd. The answers to the below questions are to be submitted hardcopy (on paper). (1). Function calls in C consist of an expression (returning a value of some function type) followed by a comma-separated list of actual parameter expressions within parentheses. The actual parameter list can be empty, but the parentheses must still be present. Assuming that a nonterminal has already been defined for expressions, write a BNF grammar for C++ function calls. The start symbol of your grammar should be called . (2). The C++ operators && and || are short-circuit versions of the boolean "and" and "or" oprators, respectively. By "short-circuit", we mean that they evaluate their second argument only if necessaty. Draw flow diagrams for the following program fragments: A) if (E && F) S else T B) if (E || F) S else T C) while (E && F) S (3). One of the interesting features of C and C++ is the ability to gain access to low-level information: 1) &x gets the address of x. If x is of type T, then &X has type T*. 2) For any two pointers p1 and p2 of type T*, (p1 - p2) gives the number of "T-sized" units between *p1 and *p2. We can use this to get the number of bytes between two locations by first converting the pointers to char*, since each char takes just 1 byte: ((char*)p1) - ((char*)p2) 3) For any object x, sizeof(x) is the number of bytes required by x and for any type T, sizeof(T) is the number of bytes requires to hold an object of type T. Use these (and other conventional programming techniques) to write a portable C++ program that evaluates the characteristics of the machine on which it is run. The output of this program should look like the following (with appropriate numbers replacing the xx's): A short int takes xx bytes. An int takes xx bytes. A long int takes xx bytes. A float takes xx bytes. A double takes xx bytes. A short int is apparently aligned at an address divisible by xx. An int is apparently aligned at an address divisible by xx. A long int is apparently aligned at an address divisible by xx. A float is apparently aligned at an address divisible by xx. A double is apparently aligned at an address divisible by xx. (4). Show the postfix of the following expression and using a stack show what the values would be if a=3, b=17, c=2. (** is raise to a power) a*a-b/(c**4+1)*a (5). We refered to Ada tasks as "servers" and "callers" where the servers contained only entries/accepts and the callers contained only calls to servers. It is possible to have tasks which contain both. Could this be a bad idea? If so, why? Give pseudo-code or a diagram(not Ada) with calls and entries to justify your answer.