hai,
please look and the snippets and explain me what is reason for the various outputs generated.
Output:
Error
Output:
Error
Output:
2000
1000
1
Output:
2000
1000
1
thanks in advance.bye
please look and the snippets and explain me what is reason for the various outputs generated.
Code:
#include<stdio.h>
#include<conio.h>
Main()
{
Int a[5]={1,2,3,4,5};\*assuming starting address of this array as 1000*/
Int *p[5]={a,a+1,a+2,a+3,a+4};\*assuming starting address of this array as 2000*/
Clrscr();
Print(“%u\n%u\n%u”,p,*p,**p);
}
Error
Code:
#include<stdio.h>
#include<conio.h>
Main()
{
Int a[5]={1,2,3,4,5};\*assuming starting address of this array as 1000*/
Static Int *p[5]={a,a+1,a+2,a+3,a+4};\*assuming starting address of this array as 2000*/
Clrscr();
Print(“%u\n%u\n%u”,p,*p,**p);
}
Error
Code:
#include<stdio.h>
#include<conio.h>
Main()
{
Static Int a[5]={1,2,3,4,5};\*assuming starting address of this array as 1000*/
Static Int *p[5]={a,a+1,a+2,a+3,a+4};\*assuming starting address of this array as 2000*/
Clrscr();
Print(“%u\n%u\n%u”,p,*p,**p);
}
2000
1000
1
Code:
#include<stdio.h>
#include<conio.h>
Main()
{
Static Int a[5]={1,2,3,4,5};\*assuming starting address of this array as 1000*/
Int *p[5]={a,a+1,a+2,a+3,a+4};\*assuming starting address of this array as 2000*/
Clrscr();
Print(“%u\n%u\n%u”,p,*p,**p);
}
2000
1000
1
thanks in advance.bye
Comment