what is the output of the following program?
main()
{
int c[]={2,8,3,4,4,6,7,5};
int j,*p=c,*q=c;
for(j=0;j<5;j++)
{
printf("%d",*c);
++q;
}
for(j=0;j<5;j++)
{
printf("%d",*p);
++p;
}
}

Answer Posted / praveen

2222228344

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is non linear data structure in c?

561


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

648


Write a code on reverse string and its complexity.

593


what is a function method?give example?

1910


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1423






main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }

908


What is a double c?

580


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

1872


Explain what is the benefit of using an enum rather than a #define constant?

710


What is size of union in c?

572


What is the main difference between calloc () and malloc ()?

566


List the difference between a While & Do While loops?

627


Why should I prototype a function?

628


What is memcpy() function?

615


If the size of int data type is two bytes, what is the range of signed int data type?

581