how to go about tis program

int array[26]
for(i=0;i<=25;i++)
{
array[i]=`A`+i;
printf("\n %d %c "array[i],array[i]

Recommended Answers

All 3 Replies

Don't understand the question. The code snippet you posted looks perfectly ok to me (other than the obvious that its not in a function and missing the last } character)

Did you bother to compile and run the program to see what it produces? If not then you should do so.

Try single quotes around the 'A' rather than backticks (plus the other bits missing).

commented: I didn't notice that -- you are right :) +27

Also that last line is missing a comma printf("\n %d %c ",array[i],array[i]);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.