为您找到"
main() { int a[3][3],*p,i; p=&a[0][0]; for(i=0;i<9;i++) p[i]=...
"相关结果约100,000,000个
We know that a++ is post increment and in post-increment we first assign then increment.when first time while loop execute, while(0<5) the printf function contains \\n which acts as a backslash escape character. Therefore it prints 0\n in the first loop, 1\n in the 2nd loop, 3\n in the 3rd loop and so on.
To multiply two matrices in C, follow these steps carefully.
arr array contains five numbers from 0 to 4. p is an array of pointers to integers and it is filled with "addresses" of the numbers stored in arr . ptr is a pointer to a pointer to integer and it is initialized with p (because in C language an array of pointers is equivalent to a pointer to a pointer).
Answer : 7, 224, 0 Description : As x = 7 so first %d gives 7, second %d will take value of x after left shifting it five times, and shifting is done after converting the values to binary, binary value of 7 (000111) will be left shifted twice to make it binary 224(11100000), so x<<5 is 224 and as left shifting does not effect the original value of x its still 5 so third %d will also show 0.
C Programming questions and answers section on "Arrays Find Output of Program" for placement interviews and competitive exams: Fully solved C Programming problems with detailed answer descriptions and explanations are given for the "Arrays Find Output of Program" section.
Predict the output of the below program. Question 1 C/C++ Code #include int main() { printf("%p", main); getchar(); return 0; } Output: Address of function main. Explanation: Name of the function is actually a pointer variable to the function and prints the address of the f
Step 1: int i = 0; here variable i is an integer type and initialized to '0'. Step 2: for(; i<=5; i++); variable i=0 is already assigned in previous step. The semi-colon at the end of this for loop tells, "there is no more statement is inside the loop". Loop 1: here i=0, the condition in for(; 0<=5; i++) loop satisfies and then i is incremented by '1'(one) ...
The correct answer is option 1.. Concept: An array is defined as a collection of data items of the same type that are stored in contiguous memory locations.
when first for is executed then, array will be - 5,3,4,6,2,1. and when the second for loop is executed then, array will be - 6,5,3,4 2,1. but the execution of while loop is not terminated here, because the value of variable done is 0.. so the first for loop is second time executed then the array will be - 6,5,4,3,2,1 . Till here the whole array is sorted in descending order so when the second ...
output 2,3,3.....first time x=4 fine. y=--x, means value of x is decremented by 1 and stored in y, thus now y=3 and x is also 3. then z=x-- means value of x is stored in z( z=3) and then x is decremented i.e now x=2 but z=3. when u r printing the value, then printf() prints 2 3 3