Question

1) A design issue for names is: a. Whether or not names should be in English...

1) A design issue for names is:

a. Whether or not names should be in English
b. Whether or not to have special words
c. Whether names are case sensitive
d. None of the above

2) Suppose we have defined a struct called person and we obtain the value of a field called height from a person using this syntax:

m->height

height is a double. What is the type of m?

a. pointer to a double
b. either a pointer to a struct person or a void pointer
c. double
d. struct person

3) WHich *two* of the following statements are true?

a. the number of real numbers is infinite
b. we can represent all real number using a finite number of bits
c. it is possible to create a computer and operating system with infinite memory
d. the memory of any actual computer is limited to a finite number of bits

4)

The difference between a procedure and a function is:

a. Functions must return values, procedures don't have to
b. Procedures are subprograms, functions aren't
c. Functions have side effects, procedures don't
d. None of the above

5) Consider this code:

double x;

void squarea(y){

    x = y * y;

}

double squareb(y){

   return y * y;

}

Which subprogram(s) has/have a side effect?

a. squarea()
b. squareb()

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)  Whether names are case sensitive
2)  either a pointer to a struct person or a void pointer
3)  the number of real numbers is infinite
    it is possible to create a computer and operating system with infinite memory
4)  Functions must return values, procedures don't have to
5)  squarea()
Add a comment
Know the answer?
Add Answer to:
1) A design issue for names is: a. Whether or not names should be in English...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Part 1: Implement a singly linked list -------------------------------------- (a) Your job is to implement a generic...

    Part 1: Implement a singly linked list -------------------------------------- (a) Your job is to implement a generic singly linked list that can hold any data type. The interface has been specified and provided to you in a header file called mylist.h. So your job is to write mylist.c that implements each function whose prototype is included in mylist.h. Specifically, you are asked to write the following functions: struct Node *addFront(struct List *list, void *data) void traverseList(struct List *list, void (*f)(void *))...

  • Please do it like someone wouldve done it as a beginer programer. Dont use pointer unless...

    Please do it like someone wouldve done it as a beginer programer. Dont use pointer unless it asking for. /* Write a program designed to get ages and heights from the user, then find the average age, average height, and average age/height ratio. */ #include <stdlib.h> #include <stdio.h> #define MAXNUM 50 typedef struct person { int age; double height; } Person; int getData(Person people[], int max) /* Get the data from the user and put it in an array of...

  • Hi this is C++, I'm really struggle with it please help me.... ************************ Here is the...

    Hi this is C++, I'm really struggle with it please help me.... ************************ Here is the original high score program,: Write a program that records high-score data for a fictitious game. The program will ask the user to enter five names, and five scores. It will store the data in memory, and print it back out sorted by score. The output from your program should look exactly like this: Enter the name for score #1: Suzy Enter the score for...

  • 1) Specify, design and implement a class called statistician.  After a statistician is initialized, it can be...

    1) Specify, design and implement a class called statistician.  After a statistician is initialized, it can be given a sequence of double numbers.  Each number in the sequence is given to the statistician by activating a member function called next_number.  For example, we can declare a statistician called s, and then give it the sequence of numbers 1.1, -2.4, 0.8 as shown here: statistician s; s.next_number(1.1); s.next_number(-2.4); s.next_number(0.8);      After a sequence has been given to a statistician, there are various member funcitons to...

  • Please help with this coding 1.You need to dynamically allocate memory to read into a number...

    Please help with this coding 1.You need to dynamically allocate memory to read into a number of elements. At first, you need to determine how many numbers (here, ‘n’) to be read. Next, you need to dynamically allocate memory for ‘n’ integers. As you see,‘x’ is an integer pointer which needs to dynamically allocate memory to read ‘n’integers into it fromthekeyboard. 2 Read nintegers into the allocated block using scanf. 3. Complete the printArrayfunction to display ‘n’ integers. void printArray(int...

  • I have some problems with my code. In Mimer I get this result for the code...

    I have some problems with my code. In Mimer I get this result for the code bellow: tests.cpp:29: Failure The difference between p1.distanceTo(p2) and 5.0 is 0.75735931288071523, which exceeds EPS, where p1.distanceTo(p2) evaluates to 4.2426406871192848, 5.0 evaluates to 5, and EPS evaluates to 1.0000000000000001e-05. Can I get some help what I did wrong here, The assignment is below: Write a class called Point that contains two doubles that represent its x- and y-coordinates. It should have get and set methods...

  • Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers...

    Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers Sometimes we're given an array of data that we need to be able to view in sorted order while leaving the original order unchanged. In such cases we could sort the data set, but then we would lose the information contained in the original order. We need a better solution. One solution might be to create a duplicate of the data set, perhaps make...

  • C Programming write two functions, similar to what you see in the sample program. The first will ask the user to enter some information (I have included the type in parentheses) First Name (char[]) L...

    C Programming write two functions, similar to what you see in the sample program. The first will ask the user to enter some information (I have included the type in parentheses) First Name (char[]) Last Name (char[]) Age (int) Height in Inches (double) Weight in Pounds (double) You will use pass-by-reference to modify the values of the arguments passed in from the main(). Remember that arrays require no special notation, as they are passed by reference automatically, but the other...

  • redo program 1(what I have type on bottom to meet the following requirements) it must not...

    redo program 1(what I have type on bottom to meet the following requirements) it must not interact with the user to receive inputs for efficiency in testing programs, while meeting the following requirements. in c++ Employee class Change the struct data type Employee to a class with all preexisting attributes(, or data members, or data fields) and an additional data member named count that keeps track of the number of Employee objects. Implement the interface that include the following functionalities...

  • linked list operation /*************************************************************************************** This function creates a new node with the information give as a...

    linked list operation /*************************************************************************************** This function creates a new node with the information give as a parameter and looks for the right place to insert it in order to keep the list organized ****************************************************************************************/ void insertNode(string first_name, string last_name, string phoneNumber) { ContactNode *newNode; ContactNode *nodePtr; ContactNode *previousNode = nullptr; newNode = new ContactNode; /***** assign new contact info to the new node here *****/ if (!head) // head points to nullptr meaning list is empty { head = newNode;...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT