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
which is an algorithm for sorting in a growing Lexicographic order
write an algorithm to display a square matrix.
What is string constants?
What is call by reference in functions?
I need testPalindrome and removeSpace
#include
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
Is javascript based on c?
Do you know the use of 'auto' keyword?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
Differentiate between the expression “++a” and “a++”?
How many types of sorting are there in c?
What is the role of && operator in a program code?
Write a program to print factorial of given number without using recursion?
How can type-insensitive macros be created?