Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

problem 1)a) How we can choice suitable data structures for formulating computer solutions to problems?

b) Design the algorithm to find out averaging a list of nonnegative numbers.

c) Design the algorithm to convert binary numbers to decimal.

problem 2)a) describe the qualities and capabilities of any good algorithm?

b) Design the algorithm that counts the number of digits in an integer.

c) Design the algorithm that reads an integer and then prints the largest Fibonacci number less than this integer.

problem 3)a) Differentiate between the following with suitable ex

(i) do ...while and while loop

(ii) while and for loop

b) describe the output that will be generated by following C programs.

(i) #include
int main()
{
int i=0, x=0;
for (i=1; i<10; i*=2)
{x++;
printf("%d",x);
}
printf("\n x=%d",x);
return 0;
}

(ii) #include
int funct (int count);
int main()
{
int a, count;
for (count=1; count<=5; ++ count)
{
a=funct (count);
printf("%d\n", a);
}
}
int funct(int x)
{
int y;
y=x*x;
return y;
}

problem 4)a) Describe various string library functions used in C with appropriate ex.

b) prepare a C program that reads a string and then prints number of Vowels and Consonants in it.

problem 5)a) What will be the output of the following program? Justify your answer.

(i) #include
int main()
{
char a[]="string", *p="string";
printf("%c %c",1[a], 1[p]);
return 0;
}

(ii) #include
int main()
{
int *a=(1,2,2,2,2), *p;
p=(int*) malloc(10);
printf("%P %p\n", a, p);
return 0;
}

b) prepare a C program using pointers to accept two matrices from user and do addition of given matrices.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M95675

Have any Question? 


Related Questions in C/C++

Programming assignment-1 program specification1 your

Programming Assignment- 1. Program Specification 1. Your program must read 8-bit ASCII strings from standard input -- for instance, using the cin object in C++, or stdin in C. You must consume all input from standard inp ...

Here are two examplesifcounter7continueifcounter7break1

Here are two examples: if(counter==7) continue; if(counter==7) break; 1. Write a for loop that counts only the odd numbers out of the first five numbers entered from the keyboard, but does not count (skips) the number 7. ...

C program codeoverviewfor this assignment write a program

C++ program code Overview For this assignment, write a program that will simulate a single game of Craps. Craps is a game of chance where a player (the shooter) will roll 2 six-sided dice. The sum of the die will determi ...

Ipo chartinputprocessingoutputmarks for four

IPO Chart Input Processing Output Marks for four courses Processing Item: Grade Point and Grade for individual course Overall GPA Algoritham Initialize gp with zero Repeat  for (each course)                 Enter the mar ...

Problem 1 you are tasked to write a program that outputs

PROBLEM 1 You are tasked to write a program that outputs the following amplifier system specifications: Voltage amplification: 25 Input voltage: 50 mV Power output: 2.5 W Bandwidth: 15 kHz Type: Class A a. For this progr ...

Write an application that allows the user to enter two

Write an application that allows the user to enter two variables: number (real) and code (character). Calculate the value indicated by the table below: If code is Result A symbol the whole part of the number everything e ...

Object oriented programmingassignmentq1 assuming there are

Object Oriented Programming Assignment Q1: Assuming there are 7.481 gallons in a cubic foot, write a program that asks the user to enter a number of gallons, and then displays the equivalent in cubic feet. Q2: You can co ...

Programwriteacprogramthatwillasktheuserforthenameofaninputfi

Program Write a C++ program that will: Ask the user for the name of an input file. Read in this name and open that text file for input. Ask the user which of two options they want to do: Read in student data Count lines ...

Cs492 programming assignment-the program must be written in

CS492 Programming Assignment- The program must be written in C or C++, and run on a linux machine. ALL source code you submit must be well documented (documentation is an indicator of understanding!) Programs that cannot ...

Write a program that calculates mileage reimbursement for a

Write a program that calculates mileage reimbursement for a salesperson at a rate of $0.35 per mile. Your program should interact with the user in this manner: MILEAGE REIMBURSEMENT CALCULATOR Enter beginning odometer re ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate