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
Thepotemich [5.8K]
3 years ago
13

Can someone please help me to point out what's wrong with this C program:

Computers and Technology
1 answer:
eimsori [14]3 years ago
3 0

Answer:

Syntax error lies in almost every statement in the main function.

Explanation:

#include [ Didn't included the standard input/output library name in the header ]

Int count [ Didn't ended this declaration with ; and included lowercase datatype int ]

/* initialize count [ Didn't closed the comment with */ ]

count = 1 [ Didn't end the statement with ; ]

/* increment count */ [ correct ]

count++; [ correct ]

print the value of count */ [ Didn't initiated the comment with /* ]

So after removing the abovementioned errors, we get the correct code as:

#include <stdio.h>

int main (void) {

   int count;

   /* initialize count */

   count = 1;

   /* increment count */

   count++;

   /* print the value of count */

   printf("count = %d\n", count);

   return 0;

}

Run this code directly using this link: replit.com/languages/c

and see the output by yourself in realtime.

Thanks and Best Regards!

Umer

You might be interested in
file Assume that a prototype of the part above was built from several cubes. The total volume of the part is 0.54675 in.3. What
Rina8888 [55]
The correct answer is D
5 0
3 years ago
Which browser do most web users use and why do you think that it is that way? Make sure you search online for statistics to conf
oksian1 [2.3K]

Answer:

2b2t

Explanation:

2b2t

4 0
4 years ago
Main components of Adobe photoshop are. ...............
Sergio039 [100]

Answer:

The correct option is;

d) All of this

Explanation:

The main components of Adobe Photoshop are;

1) Title bar displays the name of the application, as well as the name of the current document and it is located at the top of the document window

2) Tool bar is the component of the interface design in which on-screen buttons, menus, icons, and other features for input and output are placed

The tools palette is the toolbar in Adobe Photoshop

3) Menu bar consists access to the basic components such as file, edit, image, layer, used to create new jobs, compose, and edit images.

5 0
3 years ago
Write a program which increments from 0 to 20 and display results in Decimal on the console 2-b) Modify above program to increme
SVEN [57.7K]

Answer:

<em>This program is written in C++</em>

<em>Comment are used to explain difficult lines</em>

<em>The first program that prints 0 to 20 (in decimal) starts here</em>

#include<iostream>

int main()

{

//Print From 0 to 20

for(int i = 0;i<21;i++)

{

 std::cout<<i<<'\n';

}

}

<em>The modified program to print 0 to 20 in hexadecimal starts here</em>

#include<iostream>

using namespace std;

int main()

{

//Declare variables to use in conversion;

int tempvar, i=1,remain;

//Declare a char array of length 50 to hold result

char result[50];

//Print 0

cout<<"0"<<endl;

// Iterate from 1 to 20

for(int digit = 1; digit<21; digit++)

{

//Start Conversion Process

//Initialize tempvar to digit (1 to 20)

tempvar = digit;

while(tempvar!=0)

{

//Divide tempvar by 16 and get remainder

remain = tempvar%16;

if(remain<10)

{

 result[i++]=remain + 48;

}

else

{

 result[i++] = remain + 55;

}

//Get new value of tempvar by dividing it by 16

tempvar/=16;

}

//Print result

for(int l=i-1;l>0;l--)

{

cout<<result[l];

}

i=1;

cout<<endl;  

}

return 0;

}

//The Program Ends Here

See Attachments for program 1 and 2; program 2 is the modified version of 1

Download cpp
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> cpp </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> cpp </span>
3 0
3 years ago
Ashley is the record keeper for a bookshop. She gathers and maintains an organized collection of information. What is Ashley usi
maks197457 [2]

The answer is Database.

Reason being is because because the definition of database matches the statement.

- Collection of information that is organized so that it can be easily accessed, managed and updated. 

3 0
3 years ago
Read 2 more answers
Other questions:
  • based on the transcript, what did broadcasting the story through the medium of radio allow welles to do?
    8·1 answer
  • Which one of the following is NOT a type of reference method that uses a terminal digit system? 1) Account payables 2) Medical r
    11·1 answer
  • It is important that data being imported from a text file into access are separated by a character, such as a comma, which defin
    8·1 answer
  • Is it possible for the front and rear references in a circular array implementation to be equal?
    8·1 answer
  • Hey how are yall today?
    12·2 answers
  • Please help ASAP, will mark brainliest!
    7·1 answer
  • One interesting application of two-dimensional arrays is magic squares. A magic square is a square matrix in which the sum of ev
    8·1 answer
  • Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to points Distance. The calculation is:
    14·1 answer
  • What is an html skeleton? If you know what it is can you write it for me?
    12·1 answer
  • Problem: Write the Python code of a program called ComputeSquare that asks the user to enter the length of the side of the squar
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!