Dear All,
I tried out this program.
#include<stdio. h>
#include<conio. h>
#include<string .h>
void main()
{
int a[2][2] = {1,2,3,4};
clrscr();
printf("\n%s",a ++);
getch();
}
When i try to compile this program is throwing error as "L value required"
I can't understand why because i know array will internally treated as pointer
so when i increment by ++ it should point to next address.
for ex;
if i declare a variable as pointer then i can able to increment by ++
like int *p;
then p++ or ++p;
can u help me in this what is the different
I tried out this program.
#include<stdio. h>
#include<conio. h>
#include<string .h>
void main()
{
int a[2][2] = {1,2,3,4};
clrscr();
printf("\n%s",a ++);
getch();
}
When i try to compile this program is throwing error as "L value required"
I can't understand why because i know array will internally treated as pointer
so when i increment by ++ it should point to next address.
for ex;
if i declare a variable as pointer then i can able to increment by ++
like int *p;
then p++ or ++p;
can u help me in this what is the different
Comment