In: Computer Science
4.
An identifier name in a program may represent
Group of answer choices
a location
a specific machine memory address
a value
all of the above
none of the above
In order for a language to support unbounded length character strings, it must have:
Group of answer choices
static storage allocation
dynamic storage allocation
static type checking
dynamic type checking
Suppose that the vehicle registration department for the State of Florida is becoming decentralized. Each county will now handle its own registration process and will issue its own license plates. However, there needs to be some centralized checking so that counties do not duplicate plate design, etc. Counties also need to notify each other if an address listed for a registration is not within their county.
The county systems must also interface with State systems for tax and other purposes. So, while the system will be mostly decentralized, there will still exist a need for centralized data access.
A consulting firm was hired to develop this system and they have narrowed the choice of programming language to Java and C#.
What do you think about their choice of programming
languages?
How would you evaluate their choice of these programming
languages?
1. An identifier name in a program may represent:
Ans: all of the above.
Explanation:
i) a location
for eg - String name = "java"; // here the variable/identifier "name" represents the location, where the word "java" is stored.
ii) a specific machine memory address
in backend, the complier uses the specific memory address to store the value of the identifier. This identifier "name" is pointed to a specific memory address, where the value of that particular identifier is stored.
iii) a value
for eg: int age = 10;
here the age(identifier) will always represent the value 10 which is already assigned to it. If try to print age, the value of the variable "age" will be printed.
--> So the answer is "all the above".
2. In order for a language to support unbounded length character strings, it must have:
Ans: dynamic storage allocation
Explanation:
We have three different types of string handling:
i) fixed-length string handling
ii) bounded-length string handling
iii) unbounded-length string handling
Unbounded-length can hold string of any length. So for holding any length, we should have more flexibility to add/delete items frequently. So for this purpose, at backend it uses, dynamic memory allocation. So it can add/remove elements dynamically. And it provides lower efficiency but maximum flexibility. So for this reason, we use dynamic storage allocation.
3. What do you think about their choice of programming languages? How would you evaluate their choice of these programming languages?
Ans: