#include <stdio.h>int main() {int i, j, rows;printf("Enter the number of rows: ");scanf("%d", &rows);for (i = 1; i <= rows; ++i) {for (j = 1; j <= i; ++j) {printf("%d ", j);}printf("\n");}return 0;}
What will be the output of the following Java program?class leftshift_operator{public static void main(String args[]){byte x = 64;int i;byte y;i = x << 2;y = (byte) (x << 2)System.out.print(i + " " + y);}}
int main(){int a=14;while(a<20){++a;if(a>=16 && a<=18){continue;}printf("%d ", a);}return 0;}
#include <stdio.h>What is the output of this code snippetint main(){int a[ ] = {1, 2, 3, 4};int sum = 0;for (int i = 0; i < 4; i++)sum+=a[i];}printf ("%d", sum) ;return 0;}