Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED HELP WITH REVIEW QUESTIONS

Status
Not open for further replies.

clip123

Technical User
Feb 10, 2002
10
0
0
US
1)Write a statement that will create an object capable of holding the address of a float object?

2) Write a statement that will create a structure capable of holding 20 names each with a maximum of 40 characters?

3) Write a series of statements that will display on the screen the string in the following structure ONE ELEMENT at a time.
char fName[20];

4)Given the following definition: int var[10];
Do the following expressions reference the same object?
var[3] and *(var +3)

5) Given the following definition: int var[10];
Are the following expressions legal?
var++;
*(var +3);
var[3];
var+=3;

6) Is it possible to define an object in such a way that it can be accessed by some statements within a function and not by others?

7) Is it possible for the elements of an array to also be arrays?

8) What is the true/false value of the following expression('A' > 'a')?

9) Write a series of statements that will:
Create a 2 dimensional int array with 10 rows and 15 columns. Fill this array with the product(multiplication) of the row index and the column index.

10) Write a sequence of statements that define an int array having the identifier "values." The array "values" will have 1000 elements. Your code will initialize each element fo the array to the value of its index i.e.,
values[0] is initialized to 0, values[1] to 1 and so on for each element in the array.

11) Write the definition of a function that will accept an int array and return a vlaue that is the summation of a number of elements in the array. The number of elements to be summedwill be expressed in a second parameter.

12)Write the definition of a function that will accept an int array and an int parameter representing the size of the array. If the second paramter is odd, the function will display every odd value in the array. If the second parameter is even, the function will display every even value in the array.

13)Write the definition of a function that will accept an int array and return a value that is the largest value in the array. The number of elements to be examined should be expressed in a second parameter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top