Registers used: ax,ds,si,di,cl
flags affected: zf,cf
program:
assume cs:code,ds:data
code segment
mov ax,data
mov ds,ax
mov si,offset str1
mov di,offset str2
mov cl,count
cld
rep cmpsb
hlt
code ends
data segment
str1 db 04h,05h,07h,08h
count equ 04h
org 0010h
str2 db 04h,06h,07h,09h
data ends
end
result:
input: str1 (ds:0000h) = 04h,05h,07h,08h
str2 (ds:0010h) = 04h,06h,07h,09h
a write the algorithm to concatenate two given string
The String class includes two helpful methods: equals and compareTo.string1.equals(string2) will return true if the two strings contain the exact same charactersstring1.compareTo(string2) will return an int which describes the lexicographic relationship between the two strings. It will return a negative value if string1 is "less than" string2, a positive value if string1 is "greater than" string2, or zero if the two are equivalent strings.
write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit
It is called strcmp, part of the standard run-time library. Returns 0 if the two strings are equals, non-zero otherwise.
strcmp is used to compare two strings. If the return value is zero, the two strings are the same. If the return value is less than 0, then the first string is less than the second string, otherwise the first string is greater than the second string. Strings are compared lexicographically, character by character.
#include main() { //please read two strings int str1 and str2// while(str1[i]!='/0' &&str2[i]!='/0') if(str1[i]!=str2[i]) flag=1; if(flag==1) printf("equal"); } #include main() { //please read two strings int str1 and str2// while(str1[i]!='/0' &&str2[i]!='/0') if(str1[i]!=str2[i]) flag=1; if(flag==1) printf("equal"); }
write a c program to circular queue
what is the form you would use the word curiously to compare two things
first you would compare two words with others like playing:fun and writing:story
Write a two- paragraph explanation to address the following questions: Why are you interested in this program (education) and how do you expect to benefit from it?
GOUDHMARINI
i think you cannt but two strings i know how if you dont know how with two strings e mail me at bannajo@gmail.com and i wil email you back
Use list assignment i.e. for two variables $a, $b: ($a,$b) = ($b,$a)
strings
Write down the entire error message. Also, list what you were doing before you got the error. Include the program you were working in.
The modern day bandurria has 12 strings (6 pairs). During the renaissance, they had two.
Classes are well organised functions in java which help discriminate between two different functions.