What is the output of the following program#include stdio.hvoid solve() {int first = 10, second = 20;int third = first + second;{int third = second - first;printf("%d ", third);}printf("%d", third);}int main() {solve();return 0;}
#include stdio.hWhat is the output of the following programvoid solve() {int a[] = {1, 2, 3, 4, 5};int sum = 0;for(int i = 0; i 5; i++) {if(i % 2 == 0) {sum += *(a + i);}else {sum -= *(a + i);}}printf("%d", sum);}int main() {solve();return 0;}
#include stdio.hWhat is the output of the above program?int main(){int i = 3;printf(\"%d\", (++i)++);return 0;}
import java.util.Arrays;class Hello {public static void main(String[] args) {int arr[] = { 2, 3, 12, 4, 12, -2 };int[] copy = Arrays.copyOfRange(arr, 1, 4);String[] names = { "MESSI", "RONALDO", "NEYMAR" };for (int i : copy)System.out.print(names[i-2] + " ");}}
If ((a b) && (a = c))a = a + 1;elsec = c+1;
class String_demo{public static void main(String args[]){char chars[] = {'a', 'b', 'c'};String s = new String(chars);System.out.println(s);}}