Tag Archives: substring

Write an algorithm and draw flowchart to find whether a given string S1 is substring of another string S2. 10m Dec2007

Write an algorithm and draw flowchart to find whether a given string S1 is substring of another string S2. 10m Dec2007   Algorithm Step 1: Input String and Substring (Note: Substring should be smaller than String) Step 2: Find Length of String (Len1) and Find Length of Substring (Len2) Step 3: flag <- 0 Step… Read More »

An Assembly language program to find substring in given string – IGNOU MCA Assignment 2014-15

BACHELOR OF COMPUTER APPLICATIONS Course Code : BCSL-022 Course Title : Assembly Language Programming Lab Assignment Number : BCA(II)/BCSL022/Assign/14-15 Maximum Marks : 50 Weightage : 25%   Write and run an Assembly language program that finds the occurrence of a given substring, for example, BCS in a given string, for example, AXYBCSDEF (please note that in… Read More »

Write the functions to perform the following : 10m Dec2005

Write the functions to perform the following : 10m Dec2005  To accept a string and print the rightmost “n” characters   #include<stdio.h> #include<string.h> #include<alloc.h> char *rightsub(char *,int n); void main() { char s1[20],s2[20],ch,*s; int n; clrscr(); printf(“enter the string s1:”); gets(s1); printf(“enter the no of characters to extract=”); scanf(“%d”,&n); s=rightsub(s1,n); printf(“\nright sub string: %s”,s); free(s); getch();… Read More »