-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathquestions.js
More file actions
2746 lines (2181 loc) · 58.7 KB
/
questions.js
File metadata and controls
2746 lines (2181 loc) · 58.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const challenges = [
{
title: "Scanf Missing Ampersand",
category: "I/O Operations",
description:
"The scanf function requires the memory address of the variable to store the input. The code fails because it passes the variable value instead of its address.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int studentID;
int departmentCode;
printf("================================\\n");
printf(" UNIVERSITY REGISTRATION \\n");
printf("================================\\n");
printf("Enter Department Code: ");
scanf("%d", &departmentCode);
printf("Processing Department %d...\\n", departmentCode);
printf("Enter Student ID: ");
scanf("%d", studentID);
printf("Registration Complete.\\n");
printf("Welcome ID: %d\\n", studentID);
printf("================================\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int studentID;
int departmentCode;
printf("================================\\n");
printf(" UNIVERSITY REGISTRATION \\n");
printf("================================\\n");
printf("Enter Department Code: ");
scanf("%d", &departmentCode);
printf("Processing Department %d...\\n", departmentCode);
printf("Enter Student ID: ");
scanf("%d", &studentID);
printf("Registration Complete.\\n");
printf("Welcome ID: %d\\n", studentID);
printf("================================\\n");
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Variable Naming Syntax",
category: "Variables",
description:
"Variable names in C cannot start with a digit. This causes a direct compilation error.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int batchYear = 2024;
int totalStudents = 60;
int 1stSemScore = 0;
int 2ndSemScore = 0;
printf("--- Student Record System ---\\n");
1stSemScore = 85;
2ndSemScore = 90;
int total = 1stSemScore + 2ndSemScore;
printf("Batch: %d\\n", batchYear);
printf("Total Score: %d\\n", total);
printf("Average: %d\\n", total / 2);
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int batchYear = 2024;
int totalStudents = 60;
int sem1Score = 0;
int sem2Score = 0;
printf("--- Student Record System ---\\n");
sem1Score = 85;
sem2Score = 90;
int total = sem1Score + sem2Score;
printf("Batch: %d\\n", batchYear);
printf("Total Score: %d\\n", total);
printf("Average: %d\\n", total / 2);
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "String Literal Assignment",
category: "Data Types",
description:
"A char variable can only hold a single character enclosed in single quotes. Assigning a double-quoted string literal is a syntax error.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
char section;
int id = 101;
printf("Classroom Allocation\\n");
printf("Allocating for ID %d...\\n", id);
section = "A";
if (section == 'A') {
printf("Room 101 assigned.\\n");
} else {
printf("Room 102 assigned.\\n");
}
printf("Process Complete.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
char section;
int id = 101;
printf("Classroom Allocation\\n");
printf("Allocating for ID %d...\\n", id);
section = 'A';
if (section == 'A') {
printf("Room 101 assigned.\\n");
} else {
printf("Room 102 assigned.\\n");
}
printf("Process Complete.\\n");
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Float Modulo Syntax",
category: "Operators",
description:
"The modulo operator (%) is only defined for integer types. Using it with float variables causes a compilation error.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
float fileSize = 1024.50;
float packetSize = 128.0;
float remaining;
printf("Network Simulator\\n");
printf("Total Size: %f\\n", fileSize);
printf("Packet Size: %f\\n", packetSize);
printf("Calculating remainder...\\n");
remaining = fileSize % packetSize;
printf("Remaining: %f\\n", remaining);
printf("Status: Pending\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int fileSize = 1024;
int packetSize = 128;
int remaining;
printf("Network Simulator\\n");
printf("Total Size: %d\\n", fileSize);
printf("Packet Size: %d\\n", packetSize);
printf("Calculating remainder...\\n");
remaining = fileSize % packetSize;
printf("Remaining: %d\\n", remaining);
printf("Status: Pending\\n");
return 0;
}`,
difficulty: "medium",
points: 50,
timeLimit: 60,
},
{
title: "Assignment in If Condition",
category: "Operators",
description:
"Using the assignment operator (=) inside an if condition assigns the value and evaluates the result (true if non-zero), rather than comparing equality.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int battery = 85;
int isCharging = 0;
printf("--- Power Manager ---\\n");
printf("Battery: %d%%\\n", battery);
printf("Checking source...\\n");
if (isCharging = 1) {
printf("Status: Charging\\n");
printf("Fast Charge: ON\\n");
} else {
printf("Status: Discharging\\n");
printf("Saver Mode: ON\\n");
}
printf("Check Finished.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int battery = 85;
int isCharging = 0;
printf("--- Power Manager ---\\n");
printf("Battery: %d%%\\n", battery);
printf("Checking source...\\n");
if (isCharging == 1) {
printf("Status: Charging\\n");
printf("Fast Charge: ON\\n");
} else {
printf("Status: Discharging\\n");
printf("Saver Mode: ON\\n");
}
printf("Check Finished.\\n");
return 0;
}`,
difficulty: "medium",
points: 50,
timeLimit: 60,
},
{
title: "Switch Float Logic",
category: "Conditional Statements",
description:
"A switch statement's controlling expression must be of integer or character type. Using a float results in a syntax error.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
float rating = 4.0;
printf("=== Analysis System ===\\n");
printf("Processing Rating...\\n");
switch (rating) {
case 5.0:
printf("Result: Excellent\\n");
break;
case 4.0:
printf("Result: Good\\n");
break;
case 3.0:
printf("Result: Average\\n");
break;
default:
printf("Result: Poor\\n");
}
printf("End of Analysis.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int rating = 4;
printf("=== Analysis System ===\\n");
printf("Processing Rating...\\n");
switch (rating) {
case 5:
printf("Result: Excellent\\n");
break;
case 4:
printf("Result: Good\\n");
break;
case 3:
printf("Result: Average\\n");
break;
default:
printf("Result: Poor\\n");
}
printf("End of Analysis.\\n");
return 0;
}`,
difficulty: "medium",
points: 50,
timeLimit: 60,
},
{
title: "Semicolon After If",
category: "Conditional Statements",
description:
"Placing a semicolon immediately after the if condition creates an empty body, causing the subsequent block to execute regardless of the condition.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int temp = 150;
int limit = 100;
printf("Core Monitor\\n");
printf("Temp: %d\\n", temp);
printf("Checking Limits...\\n");
if (temp > limit);
{
printf("WARNING: OVERHEAT\\n");
printf("Cooling Started...\\n");
}
printf("Monitoring...\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int temp = 150;
int limit = 100;
printf("Core Monitor\\n");
printf("Temp: %d\\n", temp);
printf("Checking Limits...\\n");
if (temp > limit)
{
printf("WARNING: OVERHEAT\\n");
printf("Cooling Started...\\n");
}
printf("Monitoring...\\n");
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Infinite Loop Assignment",
category: "Looping Statements",
description:
"The while loop condition uses assignment (=) instead of equality comparison (==), setting the variable to 100 (true) repeatedly.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int progress = 0;
printf("--- Downloader ---\\n");
printf("Connecting...\\n");
printf("Starting...\\n");
while (progress = 100) {
printf("Progress: %d%%\\n", progress);
if (progress == 100) {
printf("Finished.\\n");
break;
}
progress++;
}
printf("Saved.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int progress = 0;
printf("--- Downloader ---\\n");
printf("Connecting...\\n");
printf("Starting...\\n");
while (progress <= 100) {
printf("Progress: %d%%\\n", progress);
if (progress == 100) {
printf("Finished.\\n");
break;
}
progress += 10;
}
printf("Saved.\\n");
return 0;
}`,
difficulty: "medium",
points: 50,
timeLimit: 60,
},
{
title: "For Loop Header Syntax",
category: "Looping Statements",
description:
"The three parts of a for loop header must be separated by semicolons, not commas.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int i;
int items = 5;
printf("Checkout System\\n");
printf("Scanning...\\n");
for (i = 1, i <= items, i++) {
printf("Item %d scanned.\\n", i);
}
printf("All scanned.\\n");
printf("Pay now.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int i;
int items = 5;
printf("Checkout System\\n");
printf("Scanning...\\n");
for (i = 1; i <= items; i++) {
printf("Item %d scanned.\\n", i);
}
printf("All scanned.\\n");
printf("Pay now.\\n");
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Break Without Loop",
category: "Jump Statements",
description:
"The break statement can only be used inside loops (for, while, do-while) or switch statements. Using it in a standalone if block is a syntax error.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int status = 0;
printf("Connection Module\\n");
printf("Handshake...\\n");
if (status == 0) {
printf("Error: Failed.\\n");
printf("Retrying...\\n");
break;
}
printf("Connected.\\n");
printf("Loading...\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int status = 0;
printf("Connection Module\\n");
printf("Handshake...\\n");
if (status == 0) {
printf("Error: Failed.\\n");
printf("Retrying...\\n");
return 1;
}
printf("Connected.\\n");
printf("Loading...\\n");
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Continue in Switch",
category: "Jump Statements",
description:
"The continue statement cannot be used directly inside a switch statement. It is only valid within loop structures.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int option = 1;
printf("Main Menu\\n");
printf("1. Start\\n2. Exit\\n");
switch (option) {
case 1:
printf("Starting...\\n");
continue;
case 2:
printf("Exiting...\\n");
break;
}
printf("Done.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int option = 1;
printf("Main Menu\\n");
printf("1. Start\\n2. Exit\\n");
switch (option) {
case 1:
printf("Starting...\\n");
break;
case 2:
printf("Exiting...\\n");
break;
}
printf("Done.\\n");
return 0;
}`,
difficulty: "medium",
points: 40,
timeLimit: 60,
},
{
title: "Array Declaration Parentheses",
category: "1D Arrays",
description:
"Arrays must be declared using square brackets. Using parentheses is invalid syntax for array definition.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
printf("Scoreboard Init...\\n");
int scores(5);
scores(0) = 100;
scores(1) = 95;
printf("Top: %d\\n", scores(0));
printf("Next: %d\\n", scores(1));
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
printf("Scoreboard Init...\\n");
int scores[5];
scores[0] = 100;
scores[1] = 95;
printf("Top: %d\\n", scores[0]);
printf("Next: %d\\n", scores(1));
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Array Boundary Logic",
category: "1D Arrays",
description:
"The loop condition allows accessing index 5 of a 5-element array (indices 0-4), causing an out-of-bounds error.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int buffer[5];
int i;
printf("Buffer System\\n");
printf("Clearing...\\n");
for (i = 0; i <= 5; i++) {
buffer[i] = 0;
printf("Index %d set.\\n", i);
}
printf("Ready.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int buffer[5];
int i;
printf("Buffer System\\n");
printf("Clearing...\\n");
for (i = 0; i < 5; i++) {
buffer[i] = 0;
printf("Index %d set.\\n", i);
}
printf("Ready.\\n");
return 0;
}`,
difficulty: "medium",
points: 40,
timeLimit: 60,
},
{
title: "2D Array Declaration",
category: "2D Arrays",
description:
"The second dimension (columns) of a 2D array must always be specified during declaration.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
printf("Seating Chart\\n");
printf("Layout gen...\\n");
int seats[5][] = {
{0, 0, 0, 1},
{0, 1, 0, 0},
{1, 1, 1, 0},
{0, 0, 0, 0},
{0, 0, 0, 1}
};
printf("Done.\\n");
printf("Seat 1: %d\\n", seats[0][0]);
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
printf("Seating Chart\\n");
printf("Layout gen...\\n");
int seats[5][4] = {
{0, 0, 0, 1},
{0, 1, 0, 0},
{1, 1, 1, 0},
{0, 0, 0, 0},
{0, 0, 0, 1}
};
printf("Done.\\n");
printf("Seat 1: %d\\n", seats[0][0]);
return 0;
}`,
difficulty: "medium",
points: 50,
timeLimit: 60,
},
{
title: "2D Array Access Syntax",
category: "2D Arrays",
description:
"Using a comma inside single brackets [x, y] is valid C (comma operator) but does not access a 2D array element. It effectively accesses index 'y' of the array pointer.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int grid[3][3];
int x = 1, y = 1;
printf("Game Board\\n");
printf("Init board...\\n");
grid[x, y] = 1;
printf("Placed X.\\n");
printf("Ready.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int grid[3][3];
int x = 1, y = 1;
printf("Game Board\\n");
printf("Init board...\\n");
grid[x][y] = 1;
printf("Placed X.\\n");
printf("Ready.\\n");
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Printf Argument Count",
category: "I/O Operations",
description:
"The format string specifies two integers to be printed, but only one argument is provided.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int items = 5;
int cost = 50;
printf("Receipt\\n");
printf("-------\\n");
printf("Items: %d | Cost: $%d\\n", items);
printf("-------\\n");
printf("Thanks.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int items = 5;
int cost = 50;
printf("Receipt\\n");
printf("-------\\n");
printf("Items: %d | Cost: $%d\\n", items, cost);
printf("-------\\n");
printf("Thanks.\\n");
return 0;
}`,
difficulty: "easy",
points: 30,
timeLimit: 45,
},
{
title: "Variable Scope",
category: "Variables",
description:
"A variable declared inside an if block is not accessible outside that block.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int auth = 1;
printf("Security Check\\n");
if (auth) {
int code = 9999;
printf("Access OK.\\n");
printf("Start.\\n");
}
printf("Logging...\\n");
printf("Code: %d\\n", code);
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int auth = 1;
int code = 0;
printf("Security Check\\n");
if (auth) {
code = 9999;
printf("Access OK.\\n");
printf("Start.\\n");
}
printf("Logging...\\n");
printf("Code: %d\\n", code);
return 0;
}`,
difficulty: "medium",
points: 40,
timeLimit: 60,
},
{
title: "Integer Division Truncation",
category: "Operators",
description:
"Division between two integers results in an integer, discarding any fractional part before assignment to a float.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
float avg;
int total = 495;
int count = 50;
printf("Stats\\n");
printf("Total: %d\\n", total);
printf("Count: %d\\n", count);
avg = total / count;
printf("Average: %f\\n", avg);
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
float avg;
int total = 495;
int count = 50;
printf("Stats\\n");
printf("Total: %d\\n", total);
printf("Count: %d\\n", count);
avg = (float)total / count;
printf("Average: %f\\n", avg);
return 0;
}`,
difficulty: "medium",
points: 40,
timeLimit: 60,
},
{
title: "Else Without Braces",
category: "Conditional Statements",
description:
"Using multiple statements in an if block without braces causes the subsequent else to become detached, leading to a syntax error.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
int score = 30;
printf("Grader v1\\n");
printf("Score: %d\\n", score);
if (score >= 40)
printf("PASS\\n");
printf("Good Job\\n");
else
printf("FAIL\\n");
printf("Done.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int score = 30;
printf("Grader v1\\n");
printf("Score: %d\\n", score);
if (score >= 40) {
printf("PASS\\n");
printf("Good Job\\n");
}
else {
printf("FAIL\\n");
}
printf("Done.\\n");
return 0;
}`,
difficulty: "medium",
points: 50,
timeLimit: 60,
},
{
title: "Void Main Return",
category: "Variables",
description:
"The main function is declared as void, but the code attempts to return an integer value.",
language: "c",
codeSnippet: `#include <stdio.h>
void main() {
int state = 1;
printf("Bootloader\\n");
printf("Checking... OK\\n");
printf("Memory... OK\\n");
if (state) {
printf("Booted.\\n");
}
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
int state = 1;
printf("Bootloader\\n");
printf("Checking... OK\\n");
printf("Memory... OK\\n");
if (state) {
printf("Booted.\\n");
}
return 0;
}`,
difficulty: "easy",
points: 20,
timeLimit: 60,
},
];
// ------------------------------------------------------------------------------------------------------------
const challenges2 = [
{
title: "Scanf Type Mismatch",
category: "I/O Operations",
description:
"The program reads a floating-point number but uses the integer format specifier (%d) in scanf, leading to incorrect data storage.",
language: "c",
codeSnippet: `#include <stdio.h>
int main() {
float temperature;
float humidity = 45.5;
printf("--- Weather Station v2.0 ---\\n");
printf("Calibrating sensors... Done.\\n");
printf("Default Humidity: %f\\n", humidity);
printf("Enter current temperature (Celsius): ");
scanf("%d", &temperature);
printf("Logging Data...\\n");
printf("Recorded Temp: %f\\n", temperature);
printf("System shutting down.\\n");
return 0;
}`,
correctCode: `#include <stdio.h>
int main() {
float temperature;
float humidity = 45.5;