What is the output of the following program ?#include <stdio.h>#include <stdlib.h>int main (){int a;int b;for(a=1; a<11; a++){b = rand();printf( "%d\n", b );}return 0;}
String program:#include<stdio.h>#include<string.h>main(){char s1[10],s2[10],s3[10];printf("Enter String 1\n");gets(s1);printf("Enter String 2\n");gets(s2);printf("Before Swapping\n");printf("String 1 : %s\n",s1);printf("String 2 : %s\n",s2);strcpy(s3,s1);strcpy(s1,s2);strcpy(s2,s3);printf("After Swapping:\n");printf("String 1 : %s\n",s1);printf("String 2 : %s\n",s2);}Execute and find the output
what is the output of the code:
void main(){int n;printf(" Enter a number: ");scanf(" %d ", &n );printf(" %d ", (n<<3)+n);getch();}