Ask Question, Ask an Expert


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)
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;
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++

More often than not entrepreneurs will fail several times

"More often than not, entrepreneurs will fail several times before they make it and will usually learn a lot in the process. To help these entrepreneurs to succeed will require a cultural shift. We need to encourage Aust ...

Discussion questionsplease respond to all of the following

Discussion Questions Please respond to all of the following prompts: • What is a friend function and how is it declared? • Which operators cannot be overloaded and why? • What is a macro in C++ programming and what are s ...

1 learner objectivesat the conclusion of this programming

1. Learner Objectives: At the conclusion of this programming assignment, participants should be able to: * Apply repetition structures within an algorithm * Construct while (), for (), or do-while () loops in C * Compose ...

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 ...

Computer programming assignment-q1 using for loop write a c

Computer Programming Assignment- Q1. Using for loop, write a C++ program that prints out the multiples of 3 up through 75, separated by a blank space.  3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 ...

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. ...

Computer programmingobjectives1 opening a file reading from

Computer Programming Objectives: 1. Opening a file, reading from file, writing to a file and closing a file. 2. Sequential access files handling. 3. Practice C++ programming problems. Note: Carefully read the following i ...

Fix a programthe program is already done and it runs welli

Fix a program The program is already done and it runs well.. I just need someone to fix it for me, the problem happens when you insert invalid day or invalid ticket type, I want you to end the program *at that point* as ...

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 code to create the generator submit your source code

Write code to create the generator. Submit your source code as well as a description of how I could run the program, sample screenshots of the program in action, and the various changes that could be produced through you ...

  • 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