Share
Explore BrainMass

C

What value will be printed for c and d before the loop is executed?

In the following code snippet, what value will be printed for c and d before the loop is executed? What value will be printed afterward? Why do you feel that this will occur? (Code needed to make this a complete program intentionally left out.) int c = 99; int a[5]; int d = 12; printf("c = %dn",c); printf("d = %dn",

What will be printed when run in Miracle C?

In the following code, what will be printed when run in Miracle C? Why? (Code needed to make this a complete program intentionally left out.) int j; while (j < 3) { printf("The value of j = %d",j); j = j + 1; } printf("Done! ";);

Database Design Questions

1. What function must a file management system perform? a. Create the file structure. b. Add data to the file. c. Delete data from the file. d. All of the above e.None of the above 2. In a network database each set is composed of two record types: an owner record and a _________________ record. a. root b. chil

Do you think that the following C code will compile?

Do you think that the following C code will compile? Why or why not? What will be printed by it? char c; c = '1'; switch (c) { case 1 : printf("It is 1n"); break; case 2 : printf("It is 2n"); break; case 49: printf("It is 49n"); }

Creating a checkers board game in C.

In this project, you will build a program that allows two human players to play the game of checkers. Your program will graphically maintain the state of the game board and prompt the players for moves on the standard input/output. Your program will also know the rules of checkers, and will check the validity of moves to maintai

So why would Miracle C block this but Visual C++ does not?

In the following lines of code, the Miracle C compiler will not compile the line of code in the center (float x = 1/a;). Why does this occur? How can it be corrected? int a = 3; float x = 1/a; printf("The value in x is: %f",x); In some of the compilers the integer division returns an integer and hence cannot be stored

Computer Science Information Systems and Design

1. GUI COMPONENTS ARE OFTEN REFERRED TO AS: A) WIDGETS (B)GADGETS (C) DRAWINGS (D) PROMPTS 2.THE QUESTIONS THAT CASE DATABASE SOFTWARE TO EXTRACT THE APPROPRIATE RECORDS FROM A TABLE AND SPECIFY THE FIELDS TO BE VIEWED ARE CALLED: A) REPORTS (B) QUERIES (C) KEYS (D) INDEXES 3.WHAT ARE THE SIGNS OF AMATUEUR DESIGN IN A G

Miracle C program Calculator + Flow Chart

1. What is the input of the problem? (Purchase Total of $125.00 for each store) ? Del Mar - 7.25% ? Encinitas - 7.5% ? La Jolla - 7.75% _____________________________________________________________________ 2. What is the output of the problem? The sales tax amount for each store of the 125.00 Purchase for each. ___

Network security questions

There are eight network security questions. I have answered the questions however, I am unclear if I am correct. Please review and if I am wrong, please provide the correct answer along with your explanation. 1. Which of the following pieces of information can be found in the IP header? a. Source address of the IP pac

C Programming Grocery Store Checkout System using Files

Please help with the following as it relates to the existing code (separate attachment) Instead of getting the product names and prices from the standard input, enhance the program to read it from a file instead. Do not hard-code the filename within the program; ask the user to enter it instead. Also, enhance the program to s

Miracle C program on a Grocery Shop

I need to modify the existing code (separate attachment) to be more orderly in its output appearance. Basically so that the displays are similar to what is below in the samples. Right now, I get this error when attempting to compile in Miracle C: c:program filesmiracle cnewweek4.c: line 18: wrong # args in function call '{

C Programming Help

C Programming Problem. I need help writing a program in C that meets the following criteria: 1) There are 5 products for sale at a grocery store ( I want to use cucumbers, lettuce, grapes, apples and bananas) 2) The five products are all sold by weight (pounds). 3) Customers need to be prompted to enter the price (per pound)

Help With C Programming

C programming. Let us consider a simple grocery store with just 5 products. Assume that all items are sold by weight. Select 5 vegetables to use in the program. Prompt the user to enter the price (i.e. price per pound) for each of the vegetables. A customer walks-in with an unusual request: He wants to know the maximum amount o

Multiple Choice, nine part question involving memory

Use the following to answer questions 1-1 and 1-2. Given the following memory values and a one-address machine with an accumulator, what values do the following instructions load into the accumulator? Word 20 contains 40. Word 30 contains 50. Word 40 contains 60. Word 60 contains 20. Register 1 contains 10. Register

Multiple choice, four part question involving binary computing

1-1 Binary code "000000000000000111111111100" represents A. 409910 B. 409310 C. 409410 D. 409210 E. none of the above is correct. 1-2 What is the 2's complement of F ? Wherein F = 2's complement of (2's complement of "11111101000001"): A. "100011110111110" B. "110110001000001" C. "0111000010000

Problem set

(See attached file for full problem description) --- 1. Analyze the following pseudocode. Whats the ansr's final value ? Num = 8 ansr =0 if num > 5 then if num < 20 then ansr =1 else ansr = 2 endif endif . A) 0 B) 1 C) 2 D) 7 2. Which piece of pseudocode represent the checking the loop condition A) rep = 1 (B) rep=r

Some exercises with Arrays

Arrays are collections of elements of the same type. The elements of the array can be accessed using their position (index) in the array. Arrays may have several dimensions: they can be similar to lists (1-dimension), matrices (2-dimensions), cubes (3-dimensions) etc. 1. The first exercise involves a 1-dimensional array of

Select (Medians and Order statistics)

Please review problem and verify the solution. problem --------- In the algorithm SELECT, the input elements are divided into groups of 5. Will the algorithm work in linear time if they are divided into groups of 7? Argue that SELECT does not run in linear time if groups of 3 are used. solution --------- Use groups o

Calculation and conversion of time given in hours, minutes and seconds

1- inputs a time duration in hours, minutes, and seconds; 2-calculates the equivalent total number of seconds; 3-recalculates the hours, minutes, and seconds from the total; 4-displays the values of the hours, minutes, seconds, and total seconds. Specific Requirements 1-The program must be otherwise formatted and docume

Microsoft excel

28. What is the first step that should be taken when creating a chart? A. providing a name for the chart B. selecting the chart type C. selcting the range of cells that contain the data the chart will use D. choosing the data labels that will be used on the chart 29. If you want to print only the chart in a worksheet, wh

Menu based Currency Conversion Program in C

Expand the "Currency Conversion" program to include a menu that allows the user to choose which currency he/she wishes to display in its equivalency to the US dollar. - Correctly use at least 1 function or subroutine Permit the user to input an amount to be converted into US Dollars. You may assume that a number is input. Y

C language compilers

There are at least two types of integers (short or long) and two types of decimals (float or double) in most C language compilers. We should write all the programs using longs and doubles without ever needing shorts or floats. What do you think was the idea of adding these two additional (smaller) types?