0

Hi all.

I had a software exam the other day and one of the questions was :
Define a new data type called PC that contains data both about the computer and the monitor. The computer contains how much RAM (integer) and the processor speed (floating point number).
The monitor is made up of screen size (integer) and the colour [string of 10 caharacters].

Could somenone print up the answer for me to check it.

Thanks :)

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by robski
0

My answer was :

int computer, RAM, screensize;
float speed, monitor;
char colour;

void pc (computer, monitor);
computer = int RAM, float speed;
monitor = int screensize, char colour;

This didn't seem quite right to me.
Cheers

Edited by Nick Evan: added code-tags

0

Please use code tags when you post code. Also
1) you didn't define a data type anywhere.
2) the pc function that you declared is not defined anywhere.
3) the parameters to pc() need to have a type declared.
4) monitor = int something is not valid syntax

0

Oh well. Its over now. The rest of it wasn't too bad just that was a bit tough. Never mind. Thanks for the help anyway.
Cheers

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.