W.A.P to take input of an array and display the entered no.
in dos.



W.A.P to take input of an array and display the entered no. in dos...

Answer / Sanjeev Kumar Verma

Here's a simple example in C++ that takes user input for an array and displays its elements:

```cpp
#include<iostream>
using namespace std;

int main() {
int n; // number of elements in the array
cout << "Enter the number of elements in the array: ";
cin >> n;

int arr[n]; // declare an array of size n
cout << "Enter the elements of the array:" << endl;
for(int i=0; i<n; i++) {
cout << "arr[" << i << "]: ";
cin >> arr[i];
}

cout << "The entered elements are: " << endl;
for(int i=0; i<n; i++) {
cout << arr[i] << " ";
}
return 0;
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

what is node class?

1 Answers   Oracle,


what is putchar() and getchar()?????

1 Answers  


Explain a situation in which you handled a customer?s questions or problems?

1 Answers   Kplus Infotech,


hi, i m ganesh.. i have cleared LAKSHMI VILAS BANK FOR clerical post... any body who have already received interview call letter pl mail me to my mail id ganesh_280574@rediffmail.com my mobile no is 9842648112

6 Answers   Lakshmi Vilas Bank,


Why Mother Board is called Mother Board & not Father Board?

12 Answers   Microsoft, Precision Infomatic, SoftStream,


What is protocol

9 Answers   IBM,


Problem:Design and implement a class that allows a teacher to track the grades in a single ourse.Include methods that calculate the average grae, the highest grade, and the lowest grade.Wrute a program to testyour class implementation in a c#. given grades:integral=85, physics=87, datastruct=84.

1 Answers  


requirement:To move display statements in a cobol program to a dataset.These display statements were not in main program but in calling program and we were not allowed to move these info via sysout dd dsn='dataset.name' . please let me know the ways this can be handled

1 Answers   Verizon,


. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of 1 liter every hour in A, it gets filled up like, 10, 20, 40,80, 160…..in tank B. (At the end of first hour, B has 10 liters, second hour it has 20 liters and so on). If tank B is 1/32 filled of the 21 hours, what is total duration of hours required to fill it completely?

3 Answers   TCS,


true and false 1. The jawa source code can be created in a notepad editor. 2. The value of 111% 13 is 3.

2 Answers  


what is e-bum.

0 Answers   TCS,


explain in detail about life cycle of thread

1 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)