1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
borishaifa [10]
3 years ago
5

7. Write a program in C to display the string "ARRAY" in the following format : A AR ARR ARRA ARRAY

Computers and Technology
1 answer:
Art [367]3 years ago
6 0
This program will the string array in the given format.

int main(void){
char arr[6];
int counter;
strcpy(arr[], "ARRAY");

for(counter=0; counter<6; counter++){
printf("%c", arr[counter]);
}

return 0;
)

Note: Do not forget to include all the necessary library that is needed to run this program.

You might be interested in
A mobile device you are troubleshooting is experiencing a sharp decrease in performance after an hour of operation. The user pow
Finger [1]

Answer: Close or disable all unused running apps.

Explanation: when unused apps keep runningon the device, it will make the device to keep lagging, thereby reducing it efficiency. But once those apps are disabled or closed and the system is probably restarted, the device will regain it efficiency back.

8 0
3 years ago
Consider the following code:
Deffense [45]

Answer:

The output of C is 102.

100 + 1 + 1 = 102

8 0
3 years ago
class secretType { public: static int count; static int z; secretType(); secretType(int a); void print(); static void incrementY
DanielleElmas [232]

Answer:

The answer to this question can be given as:

In this class definition, there are two constructors.  

Explanation:

In the class definition two constructors are different in type but first we explain constructor that can be as:

Constructor: constructor are special member functions whose task is to initialized as an object of its class.

Rule for defining constructor:

A constructor doesn’t have a return type not even void.

The name of the constructor must be the same as the class name.

A constructor is called automatically when a new instance of an object is created.

Type of constructor:

  1. default constructor.
  2. parameterized constructor.
  3. copy constructor.

In the question there are two type of constructor is used that can be given as:

default constructor:  

The constructor without any parameters is called a default constructor. This type of constructor is called automatically when a new instance of an object is created.

parametrized constructor:

In the parameterized constructor we use at least one parameter in the constructor that is called the parameterized constructor. In the parameterized constructor we can initialize each instance of the class with several values.

Example :

class AB   //define class  

{  

   String name; //define variable

   AB()   //default constructor

   {

   System.out.print("hello...");  //message.

   }

   AB(String name)  //parametrized constructor.

   {  

       this.name = name;  //holding value in name variable.

   }  

}  

class Main  //define class

{  

   public static void main (String[] args)  //main method  

   {  

   AB OB1 =new AB();   //creating class object.

   AB ob2=new AB("XYZ");

   System.out.print(ob2.name);  //print value

   }  

}

Output:

hello... XYZ

5 0
3 years ago
Write a script that prints the multiples of 7 between 0 and 100. Print one multiple per line and avoid printing any numbers that
Sedbober [7]

Answer:

The program to this question can be described as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int x; //defining integer variable

for(x=0;x<=100;x++) //defining loop to count value from 0 to 100

{

   if(x%7==0) //check value is divisable by 7

   {

       cout<<x<<endl; //print value

   }

}

   return 0;

}

Output:

please find the attachment.

Explanation:

In the above code, an integer variable x is declared, which is used in the for loop, in this loop variable  "x" starts from 0 and ends when the value of x is less than and equal to 100.

  • Inside the loop an, if block is used that defines a condition that is (i%7==0), it will check, that the value is divided by 7.
  • In this loop, a print method is used, that prints its values.

8 0
3 years ago
Give me the answers to all the tasks
enot [183]
Task one; Immersion and Interaction are most important for virtual reality to provide a smooth and enjoyable experience for the user

For task two the multiple choice on slide 5 has the answers to the quiz
5 0
1 year ago
Other questions:
  • After doing the route tracing to a particular IP addresses, paste the path of IP addresses that were taken from your IP address
    13·1 answer
  • Write a function called printbackwards() that will work with a c++ string
    14·1 answer
  • __________ is when a person feels compelled to acquire and abuse a drug despite the harm it causes him or her personally, and de
    7·2 answers
  • Describe some advantages of a 64-bit versus 32-bit version of windows.
    9·1 answer
  • Naruto Uzumaki who likes naruto ??? who waches it??
    14·2 answers
  • Write a program to read data from a file named problem 2. ext. This file has three exams data (floating point data) in three col
    11·1 answer
  • In a CPMT, a(n) ____ should be a high-level manager with influence and resources that can be used to support the project team, p
    10·1 answer
  • You need to install an operating system on a computer that will be sharing files for the company employees. You estimate there w
    9·1 answer
  • cpp g Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print fo
    15·1 answer
  • In traditional programming, probably the most often used error-handling outcome was to ____.Group of answer choicesterminate the
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!