org 100h
.data
str1 db "Computer"
str2 db "computer"
mes1 db "string are same $"
mes2 db "string are different $"
.code
assume cs:code,ds:data
start: mov ax,@data
mov ds,ax
mov es,ax
mov si,offset str1
mov di,offset str2
cld
mov cx,8
repe cmpsb
mov ah,9
jz skip
lea dx,mes2
jmp over
skip: lea dx,mes1
over: int 21h
mov ax,4c00h
int 21h
end start
ret
Mov cx,0005
mov ax,0000
mov ds,ax
mov si,3000
mov di,5000
cld
rep mov sb
mov cx,0005
mov ax,0000
mov ds,ax
mov si,3200
mov di,3000
cld
rep mov sb
mov cx,0005
mov ax,0000
mov ds,ax
mov si,5000
mov di,3200
cld
rep mov sb
int 03
org 3000
db 01
db 02
db 03
db 04
db 05
org 3200
db 06
db 07
db 08
db 09
db 0a
eq
There is very little difference, functionally, between assembly language and machine level language. Each assembly language statement corresponds to one machine instruction. The difference is in readability (who wants to read and write in hex code?) and in ease of address computation.
Yes, it does.
That depends on who you ask and how far back you go. It could be Intel, it could be whoever designed the ENAIC (used for looking up trajectory tables) but I think it was Charles Babbage, inventor of the 'analytical machine.' More: http://en.wikipedia.org/wiki/Turing_complete
There is no data type string in C. String is handled as an array of characters. To identify the end of the string, a null character is put. This is called a null terminated character array. So array of strings will be a double dimensioned array of chars. It is implemented as an array of pointers, each pointer pointing to an array of chars.
Program below?!
(ab)*b
String class in Java has an 'equals' method that can be used to compare strings.
eq
There is very little difference, functionally, between assembly language and machine level language. Each assembly language statement corresponds to one machine instruction. The difference is in readability (who wants to read and write in hex code?) and in ease of address computation.
Yes, it does.
Well, for one, string bass strings are a lot longer than electric bass strings. I wouldn't recommend putting string bass strings on an electric bass and vice versa.
You don't need a program to compare strings since std::string already provides support for all the comparison operators (<, <=, >, >=, == and !=). To roll your own you must first create a string class and then provide operator overloads for the comparison operators. To compare strings, start at the first character in each string and compare. So long as they remain equal, move onto the next character. The comparison ends as soon as any character differs. You need only compare these two characters to decide which string is the lesser. To perform a case insensitive comparison, copy the two characters and convert the copies to lower case (or upper case, it doesn't matter). Then compare the copies. Do this for each character as you compare them rather than converting the entire string.
how to compare two strings that take input from the user and compare it. For example: i give first string as "THE" and give second string as "HTE" then return "match" if i give first as"THE" nd second string as "EHI" then return "NOtMatch" witout using STRCMP ... please help me
That depends on who you ask and how far back you go. It could be Intel, it could be whoever designed the ENAIC (used for looking up trajectory tables) but I think it was Charles Babbage, inventor of the 'analytical machine.' More: http://en.wikipedia.org/wiki/Turing_complete
There is no data type string in C. String is handled as an array of characters. To identify the end of the string, a null character is put. This is called a null terminated character array. So array of strings will be a double dimensioned array of chars. It is implemented as an array of pointers, each pointer pointing to an array of chars.
No Strings Attached (2011) is rated R for sexual content, strong language, and some drug material.