Share
Explore BrainMass

C

A recursive C function to detect palindromes

A palindrome consists of a word or deblanked, unpunctuated phrase that is spelled exactly the same when the letters are reversed. Write a recursive function that returns a value of 1 if its string argument is a palindrome. Notice that in palindromes such as level, deed, sees, and Madam I'm Adam(madamimadam), the first letter ma

Write a C function to accept an integer number

Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups. The passed integer represents the total number of cups, and the function is to determine the number of gallons, quarts, pints, and cups in the passed value. Using the passed addresses, the fu

C program to determine the year entered is a leap year

Write a C program to determine whether the year entered from the keyboard is a leap year. Display a message indicating whether the year is or is not a leap year. To calculate this problem, a year is a leap year if it is evenly divisible by 4 and not by 100, or if it is evenly divisible by 400. Check the remainder of the divi

C Program to Display in Words What Number is Entered

Write C program to display in words what number is entered when a single digit is entered. Ask the user to enter a digit between 0 and 9. Have the program print out the digit in words, for example: Enter a digit between 0 and 9: 4 You entered the number four Assume that the user will enter only a single digit. The user

Shift variables in a circular fashion

Please help with the following problem. This needs to be in "C" Write a function that shifts the stored value of five character variables in a circular fashion. Your function should work in the following way. Suspose that C1, C2, C3, C4, C5 are variables of type char, and suspose that the values of these variables are 'A'

One of the functions in C program is special - this is the main() function.

Can you please help me with the following study question? Thanks One of the functions in C program is special - this is the main() function. What is so special about it? What differs main() from any other function which may be present in your program? Should every function be executed when the program runs?

What are the available data types in the C language?

I have a study question that I need help with thanks. What are the available data types in the C language? Why do we have so many of them? Can you use just one data type in the whole program? If yes, what would be advantages and disadvantages of that?

Input and Output Processing in C Language

Can you please help me answer the following study question? Thanks. How is the input and output processing structured in the C language? How can you display some combination of words and numbers on the computer's screen? How to get information from a keyboard to be used in your program? What are Output Format characters?

Write a structured C program implementing a simple three rotor Enigma Machine. The program should compile warning free with 'gcc -Wall -ansi', and should support a command line argument '-vvv' to enable detailed debugging messages.

Write a software implementation of a simple three rotor Enigma Machine. Please refer to the following wikipedia entries for the Enigma Machine and the Enigma Rotor details. http://en.wikipedia.org/wiki/Enigma_machine http://en.wikipedia.org/wiki/Enigma_rotor_details For the current implementation, consider only the rotors

Examples of Loops in C: While-Do, Do-Until and For-Loop

NOTE: C coding is fine. Please explain the process. Senario: For many years, your Uncle Frank has been running a small landscaping business. Through these years, he acquired many steady clients and knew most of them on a first name basis. Once a month, after completing the work for that day, he would calculate (on the spot) h

Reverse Polish to Infix

Convert the following formulas from reverse Polish to infix: a. AB + C + D x b. AB/CD/ + c. ABCDE + x x / d. ABCDE + F/ + G - H/x +

The Direction of Passing Parameters in C

Let the function fun be defined as: int fun(int *k) { *k += 4; return 3 * (*k) - 1; } Suppose fun is used in a program as follows: void main() { int I = 10, j = 10, sum1, sum2; sum1 = (I / 2) + fun(&i); sum2 - fun(&j) + (j / 2); } What are the values of sum1 and sum2? a. If the operands in the ex

Relations - Determinants - Dependencies

Consider the following relation definition and sample data: EmployeeName PeojectID TaskID Phone TotalHours Don 100A B-1 12345 12 Don 100A P-1 12345 12 Don 200B B-1 1345 12 Don 200B P-1 12345 12 Pam 100A C-1 67890 26 Pam 200A C-1 67890 26 Pam 200D C-1 67890 26 PROJECT-HOURS (EmployeeName, ProjectID, Tas

Information Technology & Business Multiple Choice

1. Some global enterprises engage in joint research projects to broaden their contacts. What is another reason? A) to reduce risk B) to ease barriers to entry C) to increase costs D) to decrease certainty E) to increase competitive complexity 2. Political factors in choosing a foreign manufacturing site i

Forking of new processes

[A] What happens when you run the following piece of code: main(int argc, char ** argv) { for(;;) fork(); } [B] Given the following piece of code: main(int argc, char ** argv) { int child = fork(); int c = 5; if(child == 0) {

Excel 2003 Multiple Choice

1. The primary object in a MS Access database for collecting and storing data is a: a. record b. field c. file d. table e. database 2. Each individual entry in a database is stored as a: a. field b. table c. record d. file e. page 3. Records are stored in a database file as a: a. row b. column c. s

CSCI Excel 2003 Multiple Choice

1. Which of the following enables you to calculate the input value required to yield a desired outcome result? a. Tools, Goal seek b. Insert, Goal seek c. Format, Goal seek d. Tools, Options, Goal seek e. Data, Goal seek Save Answer 2. Which of the following belong in the Goal Seek dialog box? a. By changing cell

MATLAB (Must be coded for MATLAB)

I need a detailed script in order to show this works in MATLAB. This problem. All I need is the circled #3 problem, but only required to do the top a) and b) graphs.

Efficient C Program to Compute Letter Grades

Write an efficient C program using arrays, that reads a file consisting of students test scores in the range of 0-100, and outputs the Letter Grades and the number of students having got it, as per the following criteria: F : 0-19 D : 20-39 C : 40-59 B : 60-79 A : 80-100

Program to produce a sales report

I need to write a program to produce a sales report similar to the one below that indicates individual percentage contribution by each employee. The program must allow the user to enter a user id number and sales amount for up to 10 employees, but must allow fewer to be entered if desired, stopping input when the user enters the

C program using functions, switch statements, if statements

I have a hard time getting started. The program is to help a student learn multiplication. I have to use the rand function to produce two positive one-digit integers. The program should type a question such as: How much is 6 times 7? The student will then type the answer. The program will then check the answer . If it i

Inverse Least Squares with Matlab

See the attached files. The data for these calculations are: knowns.xyz contains the spectra of twenty known samples, concentrations.xyz contains the concentrations of a target chemical T in each of the twenty samples, and unknowns.xyz gives the spectra of fifteen more samples whose concentrations of T you will predict. Conc

C project

In this project, you will build a program used by an admissions office to help process applicants for a graduate degree in engineering. Your program will read several database files containing applicant information and other information relevant to the applications process. Based on an admissions "formula," you will compute a

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