NASM
This repository contains solutions to practice questions given in HARDWARE_LAB - CSE -2021 , NIT CALICUT .
ARRAY AND NUMBERS .
- Program to find number of even and number of odd numbers in an array of length n.
- Program to identify numbers in an array that are divisible by 7.
- Program to Calculate Sum & Average of an Array
- Enter two digit numbers to an array of length 'n',
a) identify the number which is having highest occurrence
b) identify the number which is having lowest occurrence - program to search for a number in an array of numbers using Linear Search
- program to accept 10 numbers into an array and find the largest and smallest number
- program to find common elements between two arrays
STRING-HANDLING
- program to check whether a string is a palindrome or not
- program to read a string and reverse it
- program to read 2 strings and concatenate them
- program to read 2 strings and compare them
- program to read a string and count the number of spaces present in it
- program to Count number of vowels in a given string
STRING-HANDLING-PRO
- program to read a sentence with n words, interchange 1st and nth words, 2nd and n-1th word etc
- Find the Length of the Longest Repeating Sequence in a String
- NASM program to read a sentence and print the sentence with words sorted in lexicographic (i.e., dictionary) order.
- Program to Find the Largest and Smallest Words in a String
- Program to Search a Word in a string & Replace it with another Specified Word
Additional-Questions
-
Remove the given substring in the given string
Example :No pain , No gain .... substring to be removed - 'in' Output : No pa , No ga
-
Q: Given a string, that contains special characters together with alphabets (‘a’ to ‘z’ and ‘A’ to ‘Z’), reverse the string in a way that special characters are not affected. Treat all letters other than numbers (1-9) and characters (A-Z & a-z) as special characters. Example 1:
Input: str = "a,b$c" Output: str = "c,b$a" Note that $ and , are not moved anywhere. Only subsequence "abc" is reversed
Example 2:
Input: str = "Ab,c,de!$" Output: str = "ed,c,bA!$"
MIPS ::
- program to print first n Fibonacci numbers. Where n is the input.
- Read two number and check whether they are twin prime or not. A twin prime is a prime number that is either 2 less or 2 more than another prime number - for example (41, 43).
- program to read 2 strings and concatenate them
- Program to Find the Largest and Smallest Word in a String.
- Program to Search a Word in a string & Replace it with another Specified Word