diff --git a/Laxman singh/12may/12Q1.C b/Laxman singh/12may/12Q1.C new file mode 100644 index 0000000..b726226 --- /dev/null +++ b/Laxman singh/12may/12Q1.C @@ -0,0 +1,31 @@ +#include +main() +{ +int arr[20],size,i,n,f=0; +printf("enter the size of the array:"); +scanf("%d",&size); +printf("enter the elements of array:"); +for (i=0;i +main() +{ + int arr[20],i,j,k,size; +clrscr(); +printf("enter the size of the array:"); +scanf("%d",&size); +printf("enter the elements for array now :"); + +for(i=0;i +main() +{ + int a[10],n,i; clrscr(); + printf("enter the number to convert:"); + scanf("%d",&n); + + for(i=0;n>0;i++) + { + a[i]=n%2; + n=n/2; + + } + + printf("\n binary of given number is="); + for (i=i-1;i>=0;i--) + { + printf("%d",a[i]); + } +getch(); +} \ No newline at end of file diff --git a/Laxman singh/12may/12Q4.C b/Laxman singh/12may/12Q4.C new file mode 100644 index 0000000..89e3410 --- /dev/null +++ b/Laxman singh/12may/12Q4.C @@ -0,0 +1,24 @@ +#include +main() +{ + char s[100],s1[100]; + int i,n,c=0; + printf("enter the string :"); + gets(s); + n=strlen(s); + for(i=0;i +main() +{ + char s1[100],s2[100],i; + + printf("enter string s1:"); + + fgets(s1,sizeof(s1),stdin); + + for(i=0;s1[i]!='\0';++i) + { + s2[i]=s1[i]; + } + s2[i]='\0'; + + printf("string s2: %s",s2); + + getch(); + +} \ No newline at end of file diff --git a/Laxman singh/12may/12q1.jpg b/Laxman singh/12may/12q1.jpg new file mode 100644 index 0000000..2ee28a0 Binary files /dev/null and b/Laxman singh/12may/12q1.jpg differ diff --git a/Laxman singh/12may/12q2.jpg b/Laxman singh/12may/12q2.jpg new file mode 100644 index 0000000..a38c962 Binary files /dev/null and b/Laxman singh/12may/12q2.jpg differ diff --git a/Laxman singh/12may/12q3.jpg b/Laxman singh/12may/12q3.jpg new file mode 100644 index 0000000..6353170 Binary files /dev/null and b/Laxman singh/12may/12q3.jpg differ diff --git a/Laxman singh/12may/12q4.jpg b/Laxman singh/12may/12q4.jpg new file mode 100644 index 0000000..4a2c1a0 Binary files /dev/null and b/Laxman singh/12may/12q4.jpg differ diff --git a/Laxman singh/12may/12q5.jpg b/Laxman singh/12may/12q5.jpg new file mode 100644 index 0000000..d35c9d2 Binary files /dev/null and b/Laxman singh/12may/12q5.jpg differ