Professional Documents
Culture Documents
Name: Sonu Kumar Keshri ROLL:1904026 Assignment 2 Csl3501
Name: Sonu Kumar Keshri ROLL:1904026 Assignment 2 Csl3501
ROLL:1904026
ASSIGNMENT 2 CSL3501
CODE 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
int i;
char Name[20];
scanf("%s",&Name);
return 0;
OUTPUT:
SONU1234KUMAR
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
int n,i;
char Name[20];
scanf("%s",&Name);
printf("Enter the position of character you want to print starting from 1 ;\n");
// here i have assumed counting of letters from 1 and not zero. Real life thing
scanf("%d",&n);
if(n<(strlen(Name))+1){
else{
return 0;
OUTPUT:
Enter Your string:
13reasonsWhy