Computer Science › Choosing Appropriate Data Structures
Study the following pseudocode.
**int * var1;**
**int foo = 63;**
**var1 = &foo;**
**var2 = *var1;**
What are the values of var1 and var2?
What is the difference between declaring a function as void and declaring it as int?
What is not a feature of the Java programming language?
Imagine that I want to write a code for a bank that asks a user whether he/she wants to make a withdrawal, make a deposit, or quit. What type of loop would be best to use in order to make sure the user is able to do as many transactions as they want until they press quit to end the program?
What would be the best data structure for a library? The data is in the form of a title and a number of copies of the title.
What's wrong with the following code?
void printsometext()
{
cout<<"printing text
";
for(int i=0;i<3;i=i+1)
{
cout<<i<<"
"
}
return 2;
}
True or False.
The best data structure to represent a set of keys and values is an array.
Given the following initialized array:
int fourth;
int\[\]\[\] myArray = { {1, 2, 3},
{4, 5, 6},
{7, 8, 9} };
Using myArray, how can I store in variable "fourth", the number 4?