What is the output of the following?#include<stdio.h>int square(int);int main( ){int num[5], i;num[5] ={1, 2, 3, 4, 5};for(i=0; i<5; i++){square(num[i]);}}int square(int n){int sq;sq= n * n;printf(%d , sq);}
int fun(char *str1){char *str2 = str1;while(*++str1);return (str1-str2);}int main(){char *str = "hopeforthebest";printf("%d", fun(str));getchar();return 0;}
import java.util.Scanner;public class SwapTwoNumbers {public static void main(String[] args) {// TODO Auto-generated method stubint x, y, temp;System.out.println("Enter x and y");Scanner in = new Scanner(System.in);x = in.nextInt();y = in.nextInt();System.out.println("Before Swapping" + x + y);temp = x;x = y;y = temp;System.out.println("After Swapping" + x + y);}}