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;}
#include<stdio.h>int c[10] = {1,2,3,4,5,6,7,8,9,10};main (){int a, b=0;for(a=0;a<10;++a)if(c[a]%2 == 1)b+=c [a];printf("%d", b);}