Program1
CodeChefOpen on judge ↗
The expected output of the following C program is to print the elements in the array. But when actually run, it doesn't do so. Code: #include #define dummy (sizeof(temp) / sizeof(2[temp])) int temp[] = {1,2,3,4}; int main() { int d; //Block 1 Starts here for(d=-1;d (dummy-2);d++) //Line 1 //Block 1 Ends here printf("%d\n",temp[d+1]); return 0; } Expected Output:1 2 3 4 Rules: 1)
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start