Data Structure Arrays Question:

Download Job Interview Questions and Answers PDF

What will be output if you will execute following c code?
#include<stdio.h>
void main(){
long myarr[2][4]={0l,1l,2l,3l,4l,5l,6l,7l};
printf("%ldt",myarr[1][2]);
printf("%ld%ldt",*(myarr[1]+3),3[myarr[1]]);
printf("%ld%ld%ldt" ,*(*(myarr+1)+2),*(1[myarr]+2),3[1[myarr]]);

Arrays Interview Question
Arrays Interview Question

Answer:

6 77 667

Download Arrays Interview Questions And Answers PDF

Previous QuestionNext Question
What will be output if you will execute following c code?
#include<stdio.h>
#define var 3
void main(){
char *ptr="cquestionbank";
printf("%d",-3[ptr]);
What will be output if you will execute following c code?
#include<stdio.h>
void main(){
int array[2][3]={5,10,15,20,25,30};
int (*ptr)[2][3]=&array;
printf("%dt",***ptr);
printf("%dt",***(ptr+1));
printf("%dt",**(*ptr+1));
printf("%dt",*(*(*ptr+1)+2));