OK got it..don't bother:redface:
Type: Posts; User: ranjit89
OK got it..don't bother:redface:
So nobody will answer it?
Thanks Salem...That helped
Need to know how the compiler works..why is it so?
#include<stdio.h>
struct game
{
int level;
int score;
struct player
{
char *name;
}g2={"anil"};
}g3={10,200};
#include<stdio.h>
int main()
{
short int a=5;
printf("%d"+1,a);
return 0;
}
output:d
Why is the output so?
Nice to have the extra info..:)
Looks like you guys are right. This program gave an output of 10 on a different compiler. So behavior is unexpected...Thanks again:)
The links you have provided discuss cases where i is used both as array index and in increment expression while in this question that is not the case. It gives same output on GCC and Borland C. Any...
#include<stdio.h>
void main()
{
static int a[][2][3] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
int i = -1;
int d;
d = a[i++][++i][++i];
printf("%d", d);
}
Thanks..:):) that sums it up.
#include<stdio.h>
int main()
{
int i;
for (i = 0; i < 5; i++) {
int i = 10;
printf(" %d", i);
i++;
}
return 0;