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 / vignesh1988i
2222228344...
the above code can be remodified as :
printf("%d",*q); in first printf statement to get the same
output for both printf statements
thank u
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are examples of structures?
What is double pointer in c?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
How can a process change an environment variable in its caller?
Why do we use static in c?
How can I remove the leading spaces from a string?
How can I copy just a portion of a string?
What are the types of data files?
What are the types of pointers in c?
What is a spanning Tree?
Explain threaded binary trees?
in linking some of os executables are linking name some of them
Create a simple code fragment that will swap the values of two variables num1 and num2.