loop through int values

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

	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.
Question by:rgb192

Accepted Solution

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

Assisted Solution

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

As in :

main ()


I see the closing brace for the for loop.

Author Closing Comment

ID: 40307662
closing brace


Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
My eclipse editor won't start ? 4 162
Problem to ASCII 1 197
Test the speeds on my PC Drives 12 63
placing a checked in the checklistbox based on the value in database table. 3 23
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This tutorial is posted by Aaron Wojnowski, administrator at  To view more iPhone tutorials, visit This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
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.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

830 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