Explore BrainMass

Explore BrainMass

    C

    BrainMass Solutions Available for Instant Download

    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

    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

    C Program that Prints the Days of a Month

    Write a c program that prints the days of a month in "calender format." Th program should prompt the user for the day of the week that begins the month and the total numbers of days in the month."(days of the week should be entered as int from 0 to 6.(0 = Sunday 1 Monday 2 Tues. ... to Sat.))below is a sample output Enter a d

    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 '{

    An Iterative GCD Program and Testing in C

    Write program to test function then write and test an equivalent iterative function int gcd (int a, int b) { int r; if ((r=a%b)==0) return b else return gcd(b,r); }

    Programming Assist - In C Programming Language

    1. Files can be used to store data. There is a function called feof() in standard C library to detect end of file condition. Assume that the input file contains simplified census data; each line contains a record and each record has name, sex, and age in a specific city. Write the pseudocode to find % of males, % of females, %

    C Programming Assistance

    Please help me with the following. I need to modify my existing code to meet the following criteria: 1) After the customer has entered the price per pound for each item (this step is already in the existing code): A. Prompt the user to input the weight of each of the five products that they are purchasing. (need this step)

    C program for computing and printing the area and volume

    Write a program that computes and prints the area and volume of a sphere given its radius. (write the program in C, not C++ and create a simple program (this is an introductory exercise in the textbook)- I want to compare it to the program I came up with) Use extensive comments so that I can fully understand what your co

    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

    Query on data dictionary views (classmate schema) in oracle

    2. Write a query, based on data dictionary views, reporting a table's name, number of rows, average row length, column name (in order they appear in the table), the average column length, and the high and low values found in each column (the values are in hexadecimal format). When you are logged on as CLASSMATE, run the query. T

    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

    Which of B, C, D can A reach?

    Please see attached file for graph. Here is the question: A site is shown in Figure 4.57. R1 and R2 are routers; R2 connects to the outside world. Individual LANs are Ethernets. RB is a bridge router; it routes traffic addressed to it and acts as a bridge for other traffic. Subnetting is used inside the site; ARP is used on e

    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

    Bitwise Logical Operation in C/C++

    Given two bit strings of length n (n equal or bigger 16), find the bitwise or the bitwise and XOR of these strings. Example: 0110110110 1100011101 --------------- 1110111111 (Bit wise OR) 0100010100 (Bitwise AND) 1010101011 (Bitwise XOR

    Why Do We Need Smaller Data Types in C

    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?