program:
assume cs:code,ds:data
code segment
mov ax,data
mov ds,ax
mov cl,count
mov si,offset str1
mov di,0003h
back:mov al,[si]
xchg [di],al
mov [si],al
inc si
dec di
dec cl
jnz back
hlt
code ends
data segment
str1 db 01h,02h,03h,04h
count equ 02h
data ends
end
result:
input: str1 (ds:0000h) = 01h,02h,03h,04h
output: str1 (ds:0000h) = 04h,03h,02h,01h
its just like a string of c++
The use of the reverse string in C program is used to reverse the letters in the string. An example would be reverse me would be reversed to em esrever.
To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }
ALGORITHM REVERSEINPUT (string)"STRINGLENGTH() would be a function that returns the lenght of the string"FOR (i = STRINGLENGTH(string); i >= 0; i--) BEGINDISPAY (string[i])END FOREND REVERSE
what is string
its just like a string of c++
write program to concatenating two sting in 8086 assembly language
To reverse every word in a filter with assembly language in Linux 64-bit is easy. All you have to do is assemble the language file in an object file.
The use of the reverse string in C program is used to reverse the letters in the string. An example would be reverse me would be reversed to em esrever.
To reverse a number, first convert the number to a string, then reverse the string. Given your number consists of alphanumeric characters, the number must already be a string so simply reverse the string: #include<string> using std::string; string reverse (const string& s) { string str {}; for (auto c : s) str.insert (str.begin(), c); return str; } int main () { std::cout << "Enter a number: "; string s {}; std::cin >> s; std::cout << "The number in reverse is: " << reverse (s); }
gov
8086 assembly language program to check wether given number is perfect or not
A predefined function can reverse a string as shown below:echo strrev('pizza'); // outputs: azzip
Yes....String Test=application Integration test=assembly test.
Not possible through html. Use php strrev function. For eg:
shashi
ALGORITHM REVERSEINPUT (string)"STRINGLENGTH() would be a function that returns the lenght of the string"FOR (i = STRINGLENGTH(string); i >= 0; i--) BEGINDISPAY (string[i])END FOREND REVERSE