Ask Question, Ask an Expert


Ask C/C++ Expert

Home >> C/C++

1)a) What do you mean by const keyword? Demonstrate with help of suitable ex

b) Given the following code fragment:

int ch = 20;
cout << ch << ++ ch << ch << “\n”;

(i) The output of code fragment.

(ii) What is the effect of replacing ++ ch with ch + 1?

2) In the following program, if value of N given by user is 20, what maximum and minimum value the program could probably show?

void main()
int N, Guessme;
Guessme = random(N-10) + 10 ;

3) prepare down the name of the header files that is needed to perform the following program segment

void main()
int n;
cout<<"Enter a number";
cout<<"Square of n is "<}

4)a) What do you understand by an Array? How does it differ from normal variable? What are the different methods of initializing the array? With suitable ex, show how to input and output elements in an array. Design block diagrams wherever needed

b) prepare a program to interchange elements of a given array as given below

A = 10 13 24 65 17 38 19 after change it must be

A = 13 10 65 24 38 17 19

(adjacent element interchange , if odd numbers last element remains unchanged)

C/C++, Programming

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

Have any Question? 

Related Questions in C/C++

Only one programwrite a c program to find fibonacci numbers

Only one program Write a C++ Program to Find Fibonacci Numbers using Dynamic Programming.

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

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 a C++ program that will use loops to perform each of the following tasks: 1. Ask the user for two characters from the keyboard and read them into char variables. Determine which input is larger and which is smaller ...


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

Programming assignment- in this assignment you are

Programming Assignment- In this assignment you are requested to write a C++ program that displays the following colored pyramid on the screen: - The pyramid is 71 characters wide and 21 characters high. - To draw it, you ...

Computer scienceprogram-write a c program that willpresent

Computer Science Program- Write a C++ program that will: Present the user with a menu of choices: 1. Random number 2. String 3. Type Casting 4. Integer Math Then, in an if-else if structure (or switch) write the code for ...

Problem 1overview for problem 1a of this assignment you

Problem #1 Overview: For problem 1(a) of this assignment, you will need a C++ compiler. In order to receive credit, your program must compile and run; and you must provide the actual source code file so that I can compil ...

1 requirementsin this assignment you can unleash your

1. REQUIREMENTS In this assignment, you can unleash your imaginations and use OpenGL with C/C++ programming to produce a scene(s) that represents what you envision could possibly be seen under the sea. Please note that a ...

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

  • 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