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

1 three employees in a company are up special pay increase

1. Three employees in a company are up special pay increase. You are given a file, with the following data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Each input line consists of an employee ...

1 write a c program that allows the user to create a test

1. Write a C++ program that allows the user to create a test bank of questions 2. The program should first ask the user how many questions he or she wishes to create. 3- The user should now be prompted for all informatio ...

Cosci 21a programming assignmentpurpose experience with

COSCI 21a, Programming Assignment Purpose: Experience with some basic data structures, including circular queues, linked lists, hash tables, and specifically with pointers and the associated dynamic memory allocation. Pr ...

Write a c program that prompts the user to enter a line of

Write a C program that prompts the user to enter a line of text (up to 50 characters). It should then convert the text entered to uppercase letters and then to lowercase letters, and then to Sentence case. Your program s ...

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

Write a program to draw a symmetric shape of your own using

Write a program to draw a symmetric shape of your own using C++ user-defined functions and arrays. The program should draw a shape in its original and opposite forms (black and white and then white and black). Please con ...

The second portion instruction shown below which is the

The second portion (instruction shown below) which is the actual C++ program is needed by this Saturday. Write a C++ program that is menu-driven that allows for the following menu choices:Load an exam: Loading an exam sh ...

Bankers algorithmimplement the bankers algorithm for

Banker's Algorithm Implement the Banker's algorithm for deadlock avoidance, that works on a given set of N processes and M resource types (N The input data and result is then displayed on the screen. You may use your pro ...

Programming in c assignmentwrite a c program that computes

Programming in C Assignment Write a C program that computes and outputs the current age of the United States in days (you can use 1776 as theUS founding year). You don't have to worry about fractional years or leap years ...

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

  • 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

WalMart Identification of theory and critical discussion

Drawing on the prescribed text and/or relevant academic literature, produce a paper which discusses the nature of group

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