Tag: Lab programs
System Software – SIC/XE Program to write a subroutine for SIC that will read a record into a buffer
Problem Statement Write a subroutine for SIC that will read a record into a buffer. The record may be any length from 1 to 100 bytes. The end of record is marked with a “null” character (ASCII code 00). The subroutine should place the length of the record read into a variable named LENGTH. Solution Line Number Code Comments 1 RDREC LDX ZERO 2…
C Program to find if the given number is a Strong Number or not.
Problem Statement You need to write a program in C to find if the given number is a strong number or not. How to find if the given number is a strong number ? What is a strong number ? A number is said to be a strong number when the sum of the factorial of a number’s individual digits are equal to the number…
C Program to compare arrays
Problem Statement You need to write a program in C to compare two arrays of characters and display if they are equal or not. How to compare two arrays in C ?
C Program to convert lower case string to upper case
Problem Statement Write a program in C to convert the given string from lower case to upper case. How to convert a lower case string to upper case string in C ?
C Program to check number is perfect number or not
Problem Statement Write a program in C to find if the given number is a perfect number or not. A number is said to be a perfect number if it is a positive number and when the sum of its divisors are equal to the number. How to find if the number is a perfect number or not ?
Finding Factorial of a Number using Function Delegates in C#
Below is a sample code snippet demonstrating the use of function delegates in C# to find the factorial of the number. How to find the factorial of a Number using Function Delegates in C# ?
C program to compare 2 numbers using ternary operator
Problem Statement Write a program in C to compare 2 numbers without using if statement but instead use the ternary operator. C program to compare 2 numbers using ternary operator
C Program to find the simple and compound interest
Problem Statement You need to find the simple and the compound interest for the given principal , time and rate of interest. How to find the simple and compound interest in C ?