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

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users should you!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why this code doesn't work? 8 97
Coverting 24 hour time to 12 hour in C++ 15 168
Why does module make constant click noise ? 9 125
Passing a array as parameter - C 2 84
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…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

895 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now