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

Write a c application that does the followingitem 1 prompts

Write a C++ application that does the following: ITEM 1: Prompts the user to choose one of the following series: 1 + 1/2 + 1/3 + ... + 1/n ((((x * 2) * 2) * ...) * 2) series of n multiplications x + (x * 1) + (x * 2) + ( ...

Assignment part acreate a checkbook program using c

Assignment (part a) Create a Checkbook program using C : • Create a Check structure. Include:   o Check number (should be an integer).   o Date (use type char[ ]).   o To   o Amount   o Description • Add functions to:   ...

Assignmentgoals developing problem-solving skills declaring

Assignment Goals: Developing problem-solving skills, declaring variables, multi-way branches, data validation. Problem: Complete Programming Challenge 4.19 in your text book. Do not accept values larger than 10 meters or ...

Intro to programming in c assignmentsince this is the last

Intro to Programming in C Assignment Since this is the last assignment, there will be no late submission. All programs must be electronically submitted by 5:00pm on Tuesday, December 2nd with NO EXCEPTIONS in order to re ...

Write a c program that calculates and prints the average of

Write a C program that calculates and prints the average of two or more salaries entered by the user. The program should first prompt the user to enter the number of salaries to process (make sure: at least 2 salaries mu ...

Assignmentinstructionsthis assignment is to implement your

Assignment Instructions This assignment is to implement your own mini-grocery store in C++. Suppose you have the following Food hierarchy: FOOD FRUIT APPLE BANANA GRAPE DAIRY MILK YOGURT CHEESE (your choice) (three items ...

Programming cc assignmentsyoull need to download this to

Programming C/C++ assignments You'll need to download this To write the program. The programs will be written using the Microsoft Visual C++ Express Edition IDE (Integrated Development Environment), which can be download ...

Assignmentwhen writing c programs include comments in your

Assignment When writing C++ programs include comments in your code, make the program readable by indenting, use meaningful variable and function names, and produce meaningful output. This assignment will be to write a te ...

Programming assignment image processing - pointers class

Programming Assignment: Image Processing - Pointers, Class & Dynamic Data This project is called "Image Processing" which will shrink an input image, convert a color image to gray image , add random noise to an image, ad ...

Assignmentpart acomplete the following questionswrite c

Assignment Part A Complete the following questions: Write C++ code to open a document with the name Hello.txt, place the message "Hello, World!" in the document, and exit the document. Re open the file you closed, and 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

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen