Solved

loop through int values

Posted on 2014-09-05
3
170 Views
Last Modified: 2014-09-06
#include <stdio.h>
#include <string.h>

main()
{
	int A[] = { 2, 4, 5, 8, 1 };
	int j;
	int valueAj;
	for (j = 0; j<5; j++)
	{
		valueAj = A[j];
       }

Open in new window



for another example, I want to know why the visual studio express is saying
            valueAj = A[j];
is an error


I do not want new code to solve a loop problem
I want to know or modify this code to work.
0
Comment
Question by:rgb192
3 Comments
 
LVL 5

Accepted Solution

by:
Sapa earned 250 total points
ID: 40307120
It seems like you missed a closed brace
0
 
LVL 9

Assisted Solution

by:macarrillo1
macarrillo1 earned 250 total points
ID: 40307134
Is there a closing brace for main()?

As in :

main ()
{


}<-----Here

I see the closing brace for the for loop.
0
 

Author Closing Comment

by:rgb192
ID: 40307662
closing brace

Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to find a data that is pure string   or not in vb.net ? 9 109
UPD maximums on Red Hat 6 115
Detect CR LF to each line 12 162
How to install SVN Command Line Client? 5 67
Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question