Tag Archives: character


Write a macro to find out whether the given character is lower case or not 7m Dec2008

Write a macro to find out whether the given character is lower case or not 7m Dec2008 3. (a) Write a macro to find out whether the given character is lower case or not. 7 #include <stdio.h> //#define IS_UPPER_CASE(n) ((n) >= ‘A’ && (n) <= ‘Z’) #define IS_LOWER_CASE(n) ((n) >= ‘a’ && (n) <= ‘z’)… Read More »

Write a program in 8086 assembly Ianguage that converts each character of string to upper case and to the next character 7m Jun2008

Write a program in 8086 assembly Ianguage that accepts a character string, of maximum 10 characters, from the keyboard, converts each character of string to upper case and converts each character to the next character. i.e. A to B, B to C,and so on. Finally display the string on the screen. 7m Jun2008   DATA… Read More »

Write a 8086 assembly language program to find whether two strings are of equal length. 5m Dec2005

Write a program in 8086 assembly language to find whether two strings are of equal length. You can assume that the strings are stored in the main memory and a string is terminated by a $ character 5m Dec2005 DATA SEGMENT STR1 DB ‘GANGADHAR$’ STR2 DB ‘KOPELLA$’ MSG1 DB 10,13,’LENGTH OF THE STRING 1 IS… Read More »

Using pointers, write a program in ‘C’ to count the occurrence of each character in a given string. 10m Dec2006

Using pointers, write a program in ‘C’ to count the occurrence of each character in a given string. 10m Dec2006   #include <stdio.h> #include <string.h> void main() { char string[100],*ptr; int c=0,count[26]={0}; clrscr(); printf(“Enter a string\n”); gets(string); ptr=string[0]; while (*ptr) { /* Consider characters from ‘a’ to ‘z’ only */ if ( ptr >= ‘a’… Read More »

An Assembly Lanuage Program to search for a character in a given string and calculate the number of occurrences of the character in the given string

Now we will write another Assembly Lanuage Program to search for a character in a given string and calculate the number of occurrences of the character in the given string Let’s identify variables needed for this program. First variable will be the one which will hold the Strings entered by user in the variables P1 LABEL BYTE   … Read More »

An Assembly Lanuage Program, which converts string lower case characters to upper case characters and upper case characters to lower case characters

Now we will write another Assembly Lanuage Program, which converts string lower case characters to upper case characters and upper case characters to lower case characters. Let’s identify variables needed for this program. First variables will be the one which will hold the Strings entered by user in the variables P1 LABEL BYTE    M1 DB 0FFH    L1… Read More »

An Assembly Lanuage Program, which encodes the string into the ASCII value but not corresponding ASCII value; shift 5 place left in ASCII and write the encoding string

Now we will write another Assembly Lanuage Program, which encodes the string into the ASCII value but not corresponding ASCII value; shift 5 place left in ASCII and write the encoding string. Develop cryptographic algorithm where each letter is replaced by a different letter. Given the mapping of characters to encoded characters, it is simple… Read More »

An Assembly Language program two subroutines encrypting and decrypting – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-017 Course Title : C and Assembly Language Programming Assignment Number : MCA(1)/L017/Assign/2013    Write a Program in assembly language that has two subroutines: One for encrypting alphabets of a string and second for decrypting the encoded string. In Encryption, simply convert a character /number into its predefined numerical/character… Read More »

An Assembly program to read a character from console and echo it.

Now we will write another Assembly program which read a character from console and echo it. Let’s identify variables needed for this program. First variable will be the one which will hold the values entered at Console and it will be X. Other variable will be holding the Message “ENTER CHARACTER” to be printed for… Read More »

A C program with a function that will return the length of a character string without using inbuilt function

Let’s identify variables needed for this program. In this program, we need several variables to store string and count the number of characters in the given string. First variable will be the one which will save the string entered by the user and it will be S[50]. In C language we do not have string… Read More »