What will be the output of the following code snippet?#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;}
What is the output of the following c++ program?#include<iostrem>using namespace std;int main(){int x;int *p;x = 7;p = &x;count << *p;return 0:}
#include <stdio.h>void solve() {int n = 24;int l = 0, r = 100, ans = n;while(l <= r) {int mid = (l + r) / 2;if(mid * mid <= n) {ans = mid;l = mid + 1;}else {r = mid - 1;}}printf("%d", ans);}int main() {solve();return 0;}