Coding and Debugging 2nd Round
Coding and Debugging 2nd Round
int main()
int i,j,count;
count=0;
for(j=0;j<5;j++);
count++;
printf("%d",count);
return 0;
(A). 25 (B). 55
(C). 1 (D). 0
3. What will happen when the following program is executed?
Integer a, b, c
Set a = 4, b = 3, c = 1
if (a >> (c-1) && b << (c + 1))
a=a+c
Else
b = a <<< C
End if
Print a - b + c
(A). 3 (B). 5
#include <stdio.h>
void solve() {
int ch = 2;
switch(ch) {
case 1: printf("1 ");
case 2: printf("2 ");
case 3: printf("3 ");
default: printf("None");
}
}
int main() {
solve();
return 0;
}
end-switch
(C). 4 (D). 10
#include<stdio.h>
int main()
{
float i;
i = 1;
printf("%d",i);
return 0;
}
(A).int func(float);
float func(int, int, char);
(B).int func(int);
int func(int);
(C).int func(int, int);
float func1(float, float);
#include<stdio.h>
int main()
printf("%d", any);
return 0;