Basic + HRA + DA + CCA 10 % of GS
|
|
- Marvin Flowers
- 7 years ago
- Views:
Transcription
1 Section : Basic Programs: Question 1: WP to input roll number, name, marks and phone of a student and display the values. Question 2: WP to input roll number, name and marks of a student in 5 subjects and calculate the total and average marks. Display all the values. Question 3: WP to find out the square of a given number. Question 4: WP to input a number and print its cube. Question 5: WP to input radius and calculate the area and circumference of a circle. Question 6: WP to input length and breadth of a rectangle and calculate the area and perimeter. Question 7: WP to input 4 integers a, b, c, d and check that the equation a 3 + b 3 +c 3 = d 3 is satisfied or not. Question 8: WP to input side of a square and calculate the area. Question 9: WP to input principle, rate and time from the user and calculate the simple interest and total amount. Display all the values. Question 10: WP to input the number the days from the user and convert it into years, weeks and days. Question 11: WP to input a character and print its SCII value. Question 12: WP to input a number and print its equivalent character code. Question 13: WP to find out the quotient and remainder of two numbers. ( Without using modulus ( % ) operator) Question 14: WP to input two numbers and print their quotient and remainder. Question 15: WP to input two numbers and print the greatest using conditional operator. Question 16: WP to input marks of a student and print the result (pass/fail) using conditional operator. Question 17: WP to input inches from the user and convert it into yards, feet and inches. Question 18: WP to find out the area of a triangle. Question 19: WP to find whether a given number is even or odd using conditional operator. Question 20: WP to find out the greatest of three numbers using conditional operator. Question 21: WP to input choice (1 or 2). If choice is 1 print the area of a circle otherwise print the circumference of circle. Input the radius from user. Question 22: WP to input a number. If the number is even, print its square otherwise print its cube. Question 23: WP to input employee code, name and basic salary of an employee and calculate the following values: HR 40 % of basic salary D 10 % of basic salary CC 5 % of basic salary GS Basic + HR + D + CC PF 10 % of GS IT 10 % of GS NS GS (PF + IT) Display all the values. Question 24: WP to input the temperature in Fahrenheit and convert it into Celsius and vice versa. Question 25: WP to swap the values of two integer variables
2 (a) Using extra variable (b) Without using extra variable Question 26: WP to print the system date. Question 27: WP to find the age of a person by the given date of birth. Section B: Programs Based on Control Structures Question B1: WP to input the marks of a student and print the result (passing marks = 40 %). Question B2: WP to input the age of a person and check that he is eligible for license for not. Question B3: WP to check that a given year is a leap year or not. Question B4: WP to input a number and check whether it is even or odd. Question B5: WP to input a number and check that number is divisible by 7 or not. Question B6: ccording to the Gregorian calendar, it was Monday on the date 01/01/1900. If any year is input through the keyboard write a program to find out what is the day on 1 st January of this year. Question B7: WP to input the name and age of a person and display CHILD or TEENGER according to the age. Question B8: WP to input the salary of a person and calculate the hra and da according to the following conditions: Salary HR D % 5% % 8% Question B9: WP to input marks in five subjects of a student and calculate the division according to the following conditions: Percentage Division >=60 First Second Third <40 Fail Question B10: n electricity board charges according to the following rates: For the first 100 units - 40 paisa per unit. For the next 200 units - 50 paisa per unit. beyond 300 units - 60 paisa per unit. ll users are charged meter charges also, which are Rs. 50/- Question B11: WP to input monthly salary from the user and calculate the income tax according to the following rules: Salary income tax >= % of the salary % of the salary < % of the salary Question B12: WP to input the selling price and cost price from the user and determine whether the seller has made profit or incurred loss. lso display the value of profit or loss. Question B13: WP to input a character and check that it s a small letter, capital letter, a digit or a special symbol. Question B14: WP to input two integers and determine that first is multiple of second. Question B15: WP to input a character and check that it s a vowel or a consonant. Question B16: WP to convert a small letter into capital letter and vice versa.
3 Question B17: WP to input the marks of a student in five subjects and calculate the grade according the following conditions: Marks Grade >90 S B C D <40 Fail Question B18: WP to input the sales made by a salesman and calculate the commission according to the following conditions: Sales Commission % % % > % Question B19: WP to convert the temperature according to the following conditions: Choice Conversion 1 Fahrenheit to Celsius 2 Celsius to Fahrenheit Question B20: WP to find out the largest of three numbers. Question B21: WP to input three numbers and print them in descending order. Question B22: WP to input a number (1 to 7) and print the weekday name according to the given number. Question B23: WP to input a digit and print the digit in words. Question B24: WP to input two numbers and a choice and calculate the result according to the following conditions: Choice Result 1 dd 2 Subtract 3 Multiply 4 Divide 5 Remainder Question B25: WP to input two numbers and an operator and calculate the result according to the following conditions: Operator Result + dd - Subtract * Multiply / Divide % Remainder Question B26: WP to calculate the area of a circle, a rectangle or a triangle depending upon user s choice. Choice rea 1 Circle 2 Rectangle
4 3 Triangle Question B27: WP to input the marks in theory and practical and print the result. Question B28: WP to input a date (dd / mm / yyyy) and check for the validity of the date. Question B29: WP to print counting from 1 to 10. Question B30: WP to print counting from 10 to 1. Question B31: WP to print counting from 51 to 90. Question B32: WP to find out the sum and average of all the numbers within the given range. Question B33: WP to print all the numbers falling between 2 numbers entered by the user. Question B34: WP to print all the even numbers between 1 and 50. Question B35: WP to print all the odd numbers between 1 and 50. Question B36: WP to print the sum and average of first n natural numbers. Question B37: WP to print the sum and average of first n odd numbers. Question B38: WP to print the sum and average of first n even numbers. Question B39: WP to print the table of a given number. Question B40: WP to input 2 numbers and find out the sum of all the even numbers which are not divisible by 5 but divisible by 3 and lies between the given two numbers. Question B41: WP to input the name and age of a person and print the name as many times as age. Question B42: WP to print whole screen with any character. Question B43: WP to print the factorial of a given number. Question B44: WP to input a number through the keyboard until a.. Every time a number is entered. The program should display whether it is greater than, less than or equal to the previous number. Question B45: WP to check that given number is prime or not. Question B46: WP to input a number and count its even and odd digits and find out their sum separately. Question B47: WP to generate divisors of an integer. Question B48: If a number 972 is entered through the keyboard, your program should print Nine Seven Two. Write the program such that it does this for any positive integers. Question B49: positive integer is entered through the keyboard, along with it the base of the numbering system in which you want to convert this number. WP to display the number entered, the base and the converted number. Question B50: WP to input a number and separate the number in its individual digit and print the digits separated from one another by three spaces each. Question B51: WP to convert a decimal number to equivalent binary number (fractions also). Question B52: WP to convert a decimal number to equivalent octal number. Question B53: WP to convert a decimal number to equivalent hexadecimal number. Question B54: WP to convert a binary number to the decimal number. Question B55: WP to convert a octal number to the decimal number. Question B56: WP to convert a hexadecimal number to the decimal number. Question B57: WP to convert a octal number to binary number. Question B58: WP to convert a hexadecimal number to the binary number. Question B59: WP to generate all combinations of 1, 2 and 3. Question B60: WP to find out the LCM and GCD of two given numbers. Question B61: WP to find out the least common divisor of two integers.
5 Question B62: WP to check whether square root of a number is prime or not. Question B63: WP to find out the sum of the following series: (1) 1 + x 2 /2! + x 4 /4! + x 6 /6! +.x n /n! (2) 1 - x 2 /2! + x 4 /4! - x 6 /6! +.x n /n! (3) 1 + 1/1! + 1/2! + 1/3! +. (4) 1 + 1/1! + 2/2! + 3/3! +. (5) x + x 2 /2! + x 3 /3! + x 4 /4! +.x n /n! (6) x - x 2 /2! + x 3 /3! - x 4 /4! +.x n /n! (7) 1 + 1/x + 1/x 2 + 1/x 3 + 1/x (8) x x 3 /3! + x 5 /5! x 7 /7! + x 9 /9! -.x n /n! (9) 1-2/21 + 3/31 4/41 + 5/51. (10) 1 + x 1 /2! + x 2 /3!...+ x N /(N+1)! (11) 1 + x/2! + x 2 /4! + x 3 /6! + x 4 /8! +..x n /(2n)! (12) 1 + x/1! + x 3 /2! + x 5 /3! + x 7 /4! +..x 2n-1 /n! (13) 1 + x 2 /1! + x 4 /2! + x 6 /3! + x 8 /4! +..x 2n /n! (14) 1 - x 2 /2! + x 3 /3! x 4 /4! +.x n /n! (15) 1 + x 2 /2! + x 3 /3! + x 4 /4! +.x n /n! (16) x + x 2 /3! + x 3 /5! + x 4 /7! + x 5 /9! +.x n /(2n-1)! (17) x + x 3 /2! + x 5 /3! + x 7 /4! + x 9 /5! +.x 2n-1 /n! (18) x - x 2 /3! + x 3 /5! - x 4 /7! + x 5 /9! -.x n /(2n-1)! (19) a + ar + ar 2 + ar 3 + +ar (n-1) Question B64: Input two numbers from the keyboard. Write a program to find the value of one number raised to the power of another. Question B65: WP to print all the SCII values and their equivalent characters. The SCII values vary from 0 to 255. Question B66: WP to check that given number is rmstrong number or not. ( if the sum of the cubes of each digits of the number is equal to the number itself, then the number is called the rmstrong number. For example, 153 = (1*1*1) + (5*5*5) + (3*3*3). Question B67: 145 is a special number, since it satisfies the following relation: 145 = 1! + 4! + 5! = =145 WP to print all the numbers of this kind between Question B68: WP to find out the sum of geometric series. Question B69: WP to print out all rmstrong numbers between 1 and 500. Question B70: Square of 12 is , which is a reverse of 12 has a square 441, which is same as 144 reversed. There are few numbers which have this property. Write a program to find out whether any more such numbers exist in the range of 10 to 100. Question B71: WP to find out the difference between two dates in terms of numbers of days. Question B72: WP to input n numbers and calculate the sum, average, maximum and minimum of the given numbers. (use only one variable to input the number and also find the second largest). Question B73: WP to print the sum of negative numbers, sum of positive even numbers and sum of positive odd numbers from a list of numbers entered by the user. Question B74: WP to print the largest even number and largest odd number from the list of numbers entered through keyboard. Question B75: WP to determine all Pythagorean triplets in the range 100 to 1000.
6 ( Pythagorean triplet is a set of three integers i, j, k such that i 2 + j 2 = k 2 ) Question B76: WP to print the following series: (1) 2, 4, 8, 16, 32, 64, 128, 256 (2) 1, 4, 7, 10, 40 (3) 1, -4, 7, (4) 1, 5, 11, 19, 29.. (5) (1)+(1+2)+(1+2+3)+( )..up to n terms (6) (2) + (2+4) + (2+4+6) + ( ).up to n terms. (7) (1) + (1+3) + (1+3+5) + ( )..up to n terms (8) (1 2 ) + ( )+( )+( ).up to n terms (9) (2 2 ) + ( ) + ( )+( ) up to n terms Question B77: WP to calculate the root of quadratic equation. Question B78: Write a menu driven program which has following options: 1. Factorial of a number. 2. Prime or Not 3. Odd or even 4. Exit. Question B79: WP to input a number and print its reverse number. lso check that the number is palindrome or not. Question B80: WP to input a number and find out the sum of its digits. Question B81: WP to find out the count of the digits of a given integer. Question B82: WP to print the Fibonacci series. Question B83: WP to input a name and print the name in the following pattern R R RJ RJ RJT RJT RJ RJ R R Question B84: WP to print the following series:
7 54321 B BC BCD BB CCC DDDD BCD BC B DDDD CCC BB * **** ** *** *** ** **** * B C D E F G F E D C B B C D E F F E D C B B C D E E D C B B C D D C B B C C B B B
8 B B C B B C D C B B C B B Question B85: WP to print the truth table for XY+Z. Question B86: WP to print the factorial of all the numbers till the given number. Question B87: WP to print the tables of all the numbers till the given number. Question B88: WP to input month number and year and print the calendar for the given month. Question B89: WP to find out the difference between two dates, in terms of days, months and years. Question B90: WP to add number of days or number of months in a given date. Question B91: WP to print all the prime numbers till the given number. Section C: Programs Based on Strings Question C1: WP to count the number of spaces, tabs and new line characters in a given string. Question C2: WP to input a character and a string. Each occurrence of a character in the string should be converted to opposite case i.e. upper to lower case or vice versa. Question C3: WP to count the number of words and number of characters in a given line of text except the spaces. Question C4: WP to input a multi word string and produce a string in which first letter of each word is capitalized. Question C5: WP to count the numbers of vowels, consonants, digits and special symbols in a given string. Question C6: WP to count the lower case and upper case letters in a string. Question C7: WP to search a character in a given string. Question C8: WP to search a given string into another string and displays the position if found otherwise displays 0. Question C9: WP to find a substring of given string. Question C10: WP to extract specified number of characters from a given position from a string. Question C11: WP to count all the occurrences of a character in a given string. Question C12: WP to calculate the length of a string. Question C13: WP to input two strings and print which one is lengthier. Question C14: WP to reverse a string. Question C15: WP to check a string for palindrome. Question C16: WP to copy a string into another string. Question C17: WP to concatenate two strings. Question C18: WP to compare two strings. Question C19: WP to replace every space in a string with a hyphen, tab with a hash and digit with a slash.
9 Question C20: WP to input a string and replace every lower case letter with upper case letter, upper case letter with a lower case letter, digit with a # and a special symbol with a %. Display the new string. Question C21: WP to encrypt and decrypt a string using your own method of encryption and decryption. Question C22: WP to reverse all the strings stored in an array. Question C23: WP to swap two strings stored in an array. Question C24: WP to input 5 strings in an array of strings and display all the strings with their lengths. Question C25: WP to search a string in the array of strings. Question C26: WP to display all the palindrome strings from the array of strings. Question C27: WP to convert a string into upper case and vice versa. Question C28: WP to extract given number of characters from the left of the string. Question C29: WP to extract given number of characters from the right of the string. Question C30: WP to extract given number of characters, from the desired location from the string. Question C31: WP that will print out all the rotations of a string. For example the rotations of the word abc are abc bca cab Question C32: WP that replaces two or more consecutive blanks in a string by a single blank. Question C33: WP to input 10 names in a 2D array of characters and replace the 1 st name with 5 th name and display the resultant array. Question C34: WP to input two strings consists of maximum 80 characters. Examine both the strings and remove all the common characters from both the strings. Display the resultant string. Question C35: WP to test whether a string of opening and closing parentheses is well formed or not. Question C36: WP to evaluate a postfix expression given by the user. Question C37: WP to evaluate a prefix expression given by the user. Question C38: WP to convert a given infix expression to prefix and postfix expression. Question C39: WP to convert a postfix expression to the prefix expression and vice versa. Question C40: WP to convert a postfix expression to infix expression. Question C41: WP to input an arithmetic expression comprising of numeric constants and operators and evaluate the expression at the input. Question C42: Write a function which has two strings x and y as arguments. The function finds out the first symbol of x which does not occur in y. Question C43: Write a program to check that any one of given n strings occur in a string s. Section D: Programs based on arrays Question D1: WP to input the marks of 10 students in an array of integers and display the marks. Question D2: WP to search how many times a number is present in an array. Question D3: WP to subtract two arrays of the same size. Question D4: WP to input the sales made by a salesman in every month of a given year and find out the total, average, maximum and minimum sales. Question D5: WP to calculate the average of 10 values stored in an array and display all those values which are more than the calculated average.
10 Question D6: WP which finds the locations and values of largest and second largest element in a one dimensional array. Question D7: WP to reverse an array of floats. Question D8: WP to create a sorted list using arrays. Every time the element is entered in the array, the array must remain sorted. Question D9: WP to rotate an integer array towards right by the given number of times. Question D10: WP to input 20 values in an integer array and count the negative, positive, odd and even values in the array. Question D11: Given an array named with following elements: 3, -5, 1, 3, 7, 0, -15, 3, -7, -8 WP to shift the negative numbers to the left and positive numbers to the right so that the resultant array look like the -5, -15, -7, -8, 3, 1, 3, 7, 0, 3 Question D12: WP to copy the last 5 elements of array B after first 5 elements of array. ssume length of and B is greater than 5. Question D13: WP to print all the palindrome numbers from an integer array and find out their sum. Question D14: WP to print all the prime numbers from an integer array and find out their sum. Question D15: WP to input 10 values in a float array and display all the values more than 75. Question D16: WP delete an element from the array and shift the elements (a) Towards right. (b) Towards left Question D17: WP to delete all the occurrences of a given value from the array and shift the remaining elements to the left of the array. Question D18: WP to delete duplicate elements from an array. Question D19: WP to insert a value in the array at desired location. Question D20: WP to insert a value in the sorted array. Question D21: WP to sort an array. Using bubble sort technique Using selection sort technique Using insertion sort technique. Using Quick sort technique Using Heap sort technique. Question D22: WP to check that given array is sorted in ascending / descending order. Question D23: WP to search a value in the array using Linear search technique. Using binary search technique. Question D24: WP to count the number of occurrences of a given number in an integer array. Question D25: n array consists of 50 integers in the range of 1 to 25, write a program that prints the number of times each integer occurs in the array. Question D26:, B, C are the arrays of integers of size a, b, a + b, Write a program to produce a third array C containing all the elements of array and B. Question D27: WP to merge two arrays according to the following conditions: First array Second array Resultant array
11 (1) scending scending scending (2) scending scending Descending (3) scending Descending scending (4) scending Descending Descending (5) Descending Descending scending (6) Descending Descending Descending Question D28: WP to add and multiply two large integers, which can not be represented by built in data types. QuestionD29: WP to delete all elements in between and occupying two specified positions. Question D30: WP to search the first occurrence a given sub array within another array. Question D31: WP to merge 4 arrays a, b, c, d in one array. ll the arrays are in ascending order. Section E: Two Dimensional arrays: Question E1: WP to input the values in a two dimensional array of integers and display the values. Question E2: WP to display the values of a two dimensional array in the matrix form. Question E3: WP to find out the row sum and column sum of a two dimensional array of integers. Question E4: WP to double all the elements of a matrix. Question E5: WP to print the left and right diagonal of a square matrix and find out their sum separately. Question E6: WP to find out the sum of non diagonal elements. Question E7: WP to display the upper and lower triangle of a matrix. Question E8: WP to find out the sum and difference of two matrices. Question E9: WP to find out the product of two matrices. Question E10: WP to find out the sum of negative, positive, odd and even integers separately from a two dimensional array. Question E11: WP to display those elements of a two dimensional array which are divisible by 10. lso find their sum. Question E12: WP to find out the sum of those numbers in the in a 2D array of integers which are divisible by 4 but less than 15. Question E13: WP to print all the prime numbers from a 2D array and find out their sum. Question E14: WP to transpose a square matrix. Question E15: WP to find the inverse of the matrix. Question E16: WP to find out the sum of the elements above and below the main diagonal of a square matrix. Question E17: WP to check the equality of two matrices. Question E18: WP to print all the elements of a square matrix except the diagonal elements. Question E19: WP to find the maximum, minimum and second maximum of a matrix. Question E20: WP to sort the elements of a matrix row- wise and column-wise. Question E21: WP to print squares of diagonal elements of a square matrix. Question E22: WP which finds the locations and values of largest and second largest element in a two dimensional array.
12 Question E23: Using a two dimensional array [n*n], write a program to prepare a one dimensional array B[n 2 ] that will have all the elements of as if they are stored in column major form. Question E24: Using a two dimensional array [n*n], write a program to prepare a one dimensional array B[n 2 ] that will have all the elements of as if they are stored in row major form. Question E25: WP that receives the month and year from the keyboard as integers and prints the calendar of the given month. ( according to the Gregorian calendar 01/01/1900 was Monday) Question E26: WP to print the lower half and upper half of a square matrix. Question E27: WP to construct a magic square. Question E28: WP to find out the trace of a matrix. Question E29: WP to compute the determinant of a square matrix of real numbers. Question E30: Sparse Matrix. Section F: Programs based on Functions: Question F1: Write a function that takes one integer argument and returns its square. QuestionF2: Write a function to calculate the cube of a number. Question F3: Write a function to calculate the area of a circle where radius is passed to the function as argument. Question F4: Write a function to calculate the area of a rectangle where length and breadth are passed to the function as argument. Question F5: Write a function that has three arguments principle, rate and time and returns the simple interest. Question F6: Write a function that accepts a character as argument and returns its SCII value. Question F7: Write a function to swap the values of two integer variables (i) Using Extra variable (ii) Without using extra variable. Question F8: Write a function that has one integer argument and returns 0 if number is even else returns 1. Question F9: Write a function that has one character argument and displays that it s a small letter, capital letter, a digit or a special symbol. Question F10: Write a function to print the sum and average of first n natural numbers where n is passed to the function as argument. Question F11: Write a function to print the sum and average of first n odd numbers where n is passed to the function as argument. Question F12: Write a function that returns the factorial of a number where number is passed to the function as argument. Question F13: Write a function that returns 1 if the number is prime and 0 if not prime. Number is passed to the function as argument. Question F14: Write a function that prints the sum of the digits, count of the digits and reverse of a number. Number is passed to the function as argument. Question F15: Write a function that returns the sum of the following series where x and n are passed to the function as argument. o 1 + x 2 /2! + x 4 /4! + x 6 /6! +.x n /n! o 1 - x 2 /2! + x 4 /4! - x 6 /6! +.x n /n! o 1 + x/2! + x 2 /4! + x 3 /6! + x 4 /8! +..x n /(2n)!
13 o 1 + x/1! + x 3 /2! + x 5 /3! + x 7 /4! +..x 2n-1 /n! o 1 + x 2 /1! + x 4 /2! + x 6 /3! + x 8 /4! +..x 2n /n! Question F16: Write a function that has two integer arguments and returns first number raised to the power second number. Question F17: Write a function called zero_small that has two integer arguments being passed by reference and sets the smaller of two numbers to 0. Question F18: Write a function that receives a string (character array) as argument and produces a string in which first letter of each word is capitalized. Question F19: Write a function that receives a string and a character as argument and returns 1 if the character is found in the string else returns 0. Question F20: Write a function to search a given string into another string and returns the position if found otherwise returns 0. Both the strings are passed to the function as argument. Question F21: Write a function to return the length of the string. String is passed to the function as argument. Question F22: Write a function to reverse a string. Question F23: Write a function to search a string in the array of strings. String and array of strings should be passed to the function as parameters. Question F24: Write a function to copy one string into another string. Both the strings are passed to the function as argument. Question F25: Write a function to compare two strings. The strings must be passed to the function as argument. The function should return 0 if the strings are equal else returns 1. Question F26: Write a function to extract given number of characters from the right of the string. String and integer must be passed to the function as argument. Question F27: Write a function to evaluate a prefix / postfix expression. Question F28: Write a function to sort an array using: bubble sort technique selection sort technique insertion sort technique rray is passed to the function as argument. Question F29: Write a function to delete an element from the array. rray, element to be deleted and size of the array are passed to the function as argument. Question F30: Write a function that receives an array and a number as argument and returns number of occurrences of the number in the array. Question F31: Write a function that receives an array and a number as argument and returns 1 if the number is found in the array else returns 0. (Search the number using binary search) Question F32: Write a function that has three arrays a, b, c as arguments of size m, n and m + n respectively. The array a is in ascending order, b is in descending order and function should merge both the arrays and stores them in c in descending order. Question F33: Write a function that receives a 2D array of integers as argument and prints the sum of row elements and column elements separately. Question F34: Write a function to find out the product of two matrices. Matrices are passed to the function as argument. Question F35: Write a function to transpose a square matrix. Matrix is passed to the function as argument. Question F36: Write a function to check the equality of two matrices. Matrices are passed to the function as argument and function returns 1 if they are equal else returns 0.
14 Section G: Programs based on pointers: Question G1: Write a function to swap the values of two integer variables. The addresses of the variables should be passed to the function as argument. Using extra variable Without using extra variable Question G2: Write a function which receives the addresses of two integer variables and returns the address of the variable whichever is greater. Question G3: Write a function that prints the sum of the digits, count of the digits and reverse of a number using a pointer. ddress of the number is passed to the function as argument. Question G4: Write a function having one argument of string type and print the string in the following pattern using pointers. R RJT R RJ RJ RJ RJ R RJT R Question G5: Write a program to print the following patterns using pointers. B BC BCD BCD BC B BB CCC DDDD DDDD CCC BB B C D E F G F E D C B B C D E F F E D C B B C D E E D C B B C D D C B B C C B B B Question G6: Write a function to count the number of spaces, tabs and new line characters in a given string using pointers. The string must be passed to the function as argument. Question G7: Write a function to count the numbers of vowels, consonants, digits and special symbols in a given string using pointers. The string must be passed to the function as argument. Question G8: Write a function to extract specified number of characters from a given position from a string using pointers. The function has one string argument and two integer arguments. Question G9: Write a function to concatenate two strings using pointers. Function has two string arguments.
15 Question G10: Write a function to compare two strings using pointers. Function has two string arguments and returns 0 if strings are equal else returns 1. Question G11: Write a function to encrypt and decrypt a string using pointers and use your own method of encryption and decryption. Question G12: WP to reverse all the strings stored in an array using pointers Question: Write a function to swap two strings stored in an array using pointers. The array of strings is passed to the function as arguments. Question G13: Write a function to display all the palindrome strings from the array of strings using pointers. The array of strings is passed to the function as arguments. Question G14: Write a function to reverse an array of floats using pointers. The array must be passed to the function as argument. Question G15: Write a function to print all the palindrome numbers from an integer array and find out their sum using pointers. The array must be passed to the function as argument. Question G16: Write a function to delete duplicate elements from the array using pointers. The array must be passed to the function as argument. QuestionG17: Write a function to sort an array using bubble sort technique using pointers. The array must be passed to the function as arguments. Question G18: Write a function to search a value in the sorted array using binary search technique using pointers. The array and value must be passed to the function as argument and function should return 1 if found else returns 1. Question G19: Write a function to find out the row sum and column sum of a two dimensional array of integers using pointers. The array must be passed to the function as argument. Question G20: Write a function to find out the product of two matrices using pointers. The arrays must be passed to the function as argument. Question G21: Write a function to transpose a square matrix using pointers. The array must be passed to the function as argument. Question G22: Write a function to sort the elements of a matrix using pointers. The array must be passed to the function as argument. Section H: Programs based on recursion: Question H1: WP to calculate the GCD of two numbers using recursive function. Question G2: WP to find out the factorial of two numbers using recursive function. Question H3: WP to print Fibonacci series using recursive function. Question H4: WP to sort an array using Quick sort technique (recursive). Question H5: WP for the recursive Depth first search. Question H6: WP for the recursive Breadth first search. Question H7: WP to sort an array using recursive merge sort technique. Question H8: Write a recursive merge sort algorithm. Question H9: Write a recursive function to multiply two polynomials. Section I: Programs based on structures: Question I1: WP to define a structure with the following specification Structure name Emp Ecode integer Ename character array
16 Basic salary float Hra float 40% of basic salary Da float 20% of basic salary Ta float 10% of basic salary Gross salary float basic salary + hra + da + ta It float 20 % of gross salary Pf float 10% of gross salary Net salary float gross salary (it + pf) Now perform the following operations: (1) Take an object of the given structure, input the values for the ecode, ename, basic salary, calculate all other values and display the values. (2) Take an array of objects of size 10 of the given structure and input, calculate and display the values for 10 employees. Question I2: WP to declare a structure with the following specification: Structure name abc rr array of 10 floats Max float maximum of 10 values Min float minimum of 10 values Sum float sum of 10 values vg float average of 10 values Take an object of structure type and input the values in arr and calculate all other values. Question I3: WP to declare two structures with the following specification Structure name date Dd int day Mm int month Yy int year Structure name student Rollno int Name char[10] Marks float Dob date date of birth Doa date date of admission in school Now perform the following operations: Take an object of structure student, input the values and display the values. Take an array of objects of structure student of size 10 and input the values for 10 students and display the values. Question I4: Input 10 records in an array with the following structure: Sturct item
17 { int itemcode, qty; char itemname[20]; }; Now perform the following operations: Sort the array in the ascending order of itemcode using bubble sort technique and display the resultant array. Sort the array in the descending order of itemcode using selection sort technique and display the resultant array. Input an item code and search the given item code in the array and display all the details of the given item.(using linear search technique) Input an item code and search the given item code in the array and display all the details of the given item.(using binary search technique) Question I5: Declare a structure with the following specification: Structure name line X int Y int Write a function having two arguments of structure type and returns a structure after addition of two objects. Question I6: Declare a structure with the following specification. Structure name String Char str[40] Write a function which receives two arguments of structure type and returns a structure after concatenating strings of both the objects. Section J: Programs based on classes, constructors & destructors and inheritance Question J1: WP to input rollno, name and marks in five subjects and calculate the total and average marks through classes. Define different functions to input, calculate and display the data. Question J2: WP to declare a class with the following specification Class name Emp (Data members) Private: Ecode integer Ename character array Basic salary float Hra float 40% of basic salary Da float 20% of basic salary Ta float 10% of basic salary Gross salary float basic salary + hra + da + ta It float 20 % of gross salary Pf float 10% of gross salary Net salary float gross salary (it + pf) (Member functions) Public: void Input( ) - function to input the values for
18 void calc( ) void disp( ) ecode, ename and basic salary - function to calculate all other values - function to display the all the values. Now perform the following operations: (1) Take an object of the given class, input, calculate and display values for one employee. (2) Take an array of objects of size 10 of the given class and input, calculate and display the values for 10 employees. Question J3: WP to declare a class with the following specification class name taxpayer Data members(private) int pan char name[20] float income float tax Member functions input( ) to input the data disp( ) to display the data calctax( ) to calculate the tax. Tax is calculated according to the following rates: Income tax < = % to % to % > % WP to declare the object of above class, input the data, calculate the tax and display the data. Question J4: Declare a class student with the following specification Class name student Data members(private) int rollno -roll number char name[20]; - name float marks[5];- marks in 5 subjects float Total -total marks float verage -average marks float Grade - grade according to the average marks Member functions(public) void Input( ) - to input the data void Calcgrade( ) - to calculate total, average and grade void Dispdata( ) -to display the data. Grades are calculated according to the following rates: verage Grade >= B
19 40-59 C <40 fail Now perform the following operations: (1) Take an object of the given class, input, calculate and display values for one student. (2) Take an array of objects of size 10 of the given class and input, calculate and display the values for 10 students. Question J5: Declare a class student with the following specification Class name student Data members (private) int rollno -roll number char name[20]; - name char address[30] -address of the student char city[30]; -city of the student char country[30]; -country of the student Member functions(public) void Input( ) - to input the data int Retroll( ) -function to return the roll number of the student void Dispdata( ) -to display the data. Declare an array of objects of given class of size 10 and perform the following operations. Sort the array in the ascending order of rollno and display the resultant array. Input a roll number and search the given roll number in the array and display all the details. Question J6: Define a class string with the following specifications: class name string Data members (private) char n[20]; char m[20]; Member functions (public) string ( ) constructor to initialize both the strings void rev( ) to reverse both the strings void copy( ) to copy m to n void concat( ) to concatenate both the strings void count( ) to count the number of characters in both the strings WP to declare an object of the above class and show the use of all the functions inside the class. Section K: Programs Based on function and constructor Overloading Question K1: Write a overloaded function to compute the simple interest. Question K2: Define a class with the following specification Class name xyz Data members (private) Principle float Time int Rate float Total_amount float
20 Member functions (public) xyz( ) constructor (overloaded constructor to initialize the data members) calc( ) to calculate total amount disp( ) to display all the values. Declare different objects of xyz class with different arguments, calculate the total amount for each object and display the values of all the objects. Section L:Programs based on Operator overloading Question L1: Overload unary minus(-) operator to make data members inside the structure / class negative. Using structure Using class (member functions) Using class (friend function) Question L2: Overload ++ and - - operator. Using structure Using classes (member functions) Using classes (friend functions) Question L3: Overload + operator to add two complex numbers. Using structure Using class (member function) Using class (friend function) Question L4: Overload + and * operator to add and multiply two matrices. Using structure Using class (member function) Using class (friend function) Question L5: Overload + operator to concatenate two strings Using structure Using class (member function) Using class (friend function) Question L6: Overload >> and << operators. Using structures Using classes (friend function) Using classes (friend function) Question L7: WP to overload new and delete operators inside the class. Section M: Programs based on file handling: Question M1: WP to read and write student records from a text file Student.txt. Question M2: WP to read and write employee records from a binary file emp.dat. using structures using classes Question M3: WP that opens a file message.txt and displays its contents. Question M4: WP to copy the contents of the file abc.dat to xyz.dat.
21 Question M5: binary file stu.dat contains student records. WP to create a binary file stusort.dat, which contains all the records of stu.dat in the sorted order of roll number. Question M6: WP to count the number of employee records in a binary file emp.dat whose department number is 10. using structures using classes Question M7: WP to search a given employee record by employee number or name in a binary file using structures / classes. Question M8: There are 100 records present in a file with the following structure: Sturct item { int itemcode, qty; char itemname[20]; }; WP to read these records and arrange them in ascending order of itemcode and write them in target file separately.. Question M9: WP to modify a given employee record in a binary file using structures / classes. Question M10: WP to delete a given employee record in a binary file using structures / classes. Question M11: WP to count the number of characters, alphabets, vowels and consonants in a file poem.txt. Question M12: WP to count the number of words and lines in a file poem.txt. Question M13: WP to count the number of spaces, tabs and newline characters in a file Notes.txt. Question M14: ssume that a text file named TEXT1.TXT already contains some text written into it, write a program that reads file TEXT1.TXT and create a new file named TEXT2.TXT, which shall contain only those words from the file TEXT1.TXT which don t start with an uppercase vowel ( i.e. with, E, I, O, U ). Question M15: WP which takes story.txt as input file and creates a new file story1.txt by replacing all the spaces with -, tabs by % and newlines by $. Question M16: WP that merges two input files Data1 and Data2 giving the third output file Dataf. The 2 input files contain records in ascending order of their roll numbers and resultant file should also be in ascending order. Write this program using Without using structures / classes structures classes Question M17: binary file Employee.dat containing Empno, Wrate( hourly wage rate), Noh (number of hours worked / week) fields. Write a C++ function to read each record, compute weekly wage as Wrate * Noh and display Empno, Wrate, Noh, Wrate*Noh. Question M18: WP to check a C++ program for matching characters ({ }, ( ), /* */) and display whether they are well formed or not. Question M19: WP to read a binary file Emp.dat using classes and display only those records whose salary is between and and job is Manager Question M20: WP which reads one line at a time from the disk file TRY.TXT and display it on the monitor. The maximum length of the line is 80 characters. Question M21: WP to write the contents of a string variable one character at a time to the disk file OUT.TXT.
22 Question M22: Write an interactive menu driven program to create a text file and then display the file. Create another text file by converting upper case letters to lower case letters and lower case letters to upper case letters of the newly created text file. Question M23: Write an interactive menu driven program to create a text file and then display the file. Create another text file by reversing each string of the newly created text file. Question M24: WP that reads a text file and creates another text file that is identical except that every sequence of consecutive blank space is replaced by a single space. Question M25: WP to read a text file and display it on the screen. In case number of lines exceeds 22, file should be displayed one screen at a time. Question M26: WP to print a text file on the printer. Question M27: WP that displays the size of file in bytes. Section N: Stacks and Queues (Implement all the questions using structures and classes both) Question N1: WP to implement a static stack and show the push and pop operations on the stack. Question N2: WP to implement a static queue and show the insert and delete operations on the queue. Question N3: WP to implement a static circular Queue. Question N4: WP to implement a static dequeue (using arrays). Question N5: WP to implement n stacks in single 1D array. Write functions for push and pop operations on i-th stack. Question N6: WP to implement n queues in single 1D array. Write functions for add and delete operations on i-th queue Question N7: Represent a stack and a queue in a single 1D array. Write functions for push, pop operations on stack and add, delete operations on the queue. Section O: Linked Lists (Implement all the questions using structures and classes both) Question O1: WP to implement a single linked list of integers and perform the following operations add an integer in beginning add an integer after the given element in the list add an integer before the given element in the list add an integer at the position given by the user. add an integer at end display the list delete an element from the beginning delete an element from the end delete an element from specified position. delete an element given by the user. Search an item in the list. Question O2: WP to implement a circular linked list of integers
23 Question O3: WP to implement linked stack Question O4: WP to implement a linked queue. Question O5: WP to implement a linked circular Queue. Question O6: WP to implement a linked dequeue. Question O7: WP to create two linked lists of integers in ascending order and merge both the lists to create a new list in ascending order. Question O8: WP to reverse a linked list. Question O9: WP to check that the given linked list of integers is sorted in ascending order or not. Question O10: WP to split a linked list into two linked lists, so that each list gets equal number of nodes. (delete a node if required). Question O11: WP to concatenate two linked lists. Question O12: WP to convert a singly linked list into circular linked list. Question O13: WP to create a single linked list of integers, where the new node has to be inserted in such a way that the list is always sorted in ascending order. Question O14: WP to count the maximum, minimum, sum, average and count of the values stored in the linked list of integers. Question O15: X points to the first node of the singly linked list. Search the first occurrence of ITEM in the list and split the list into two, so that y points to the sublist beginning with ITEM. Question O16: Write a program that creates a linked list of characters from a string entered by the user. Your program is then to remove a number of consecutive elements from the linked list (in effect removing a sub-string from the string entered). This is to be achieved by the user entering two integers. The first of which will represent an index (counting from zero) into the linked list, and the second will represent the number of elements to be removed. For example, if the user enters the following string (without the quotes): "I do not love C" and then enters the two integers 2 and 7, the program would output (without the quotes): "I love C" Your program is to use only one linked list. Question Q17 : WP to sort a linked list of integers using insertion sort technique. Question O18: WP to implement a doubly linked list and implement the fllowing functions : add a node in beginning add a node after the given element in the list add a node before the given element in the list add a node at the position given by the user. add a node at end display the list delete an element from the beginning delete an element from the end
24 delete an element from specified position. delete an element given by the user. Search an item in the list. Section P: Binary Trees (Implement all the questions using structures and classes both) QuestionP1: Create a binary search tree and perform Preorder traversal(recursive and non recursive) Inorder traversal(recursive and non recursive) Postorder traversal(recursive and non recursive) Question P2: WP to count the number of leaf nodes in a binary tree. Question P3: WP to list the list the data fields of a binary tree level by level. Within levels, nodes are to be listed from left to right. Question P4: WP to compute the height of a binary tree. Question P5: WP to check that two binary trees are similar. Question P6: Construct two binary trees so that their preorder traversal sequences are the same. Question P7: Construct two binary trees so that their postorder traversal sequences are the same. Question P8: Write a function to swap a binary tree. Question P9: Write a function to compute the maximum number of nodes in any level of a binary tree. The maximum number of nodes in any level of a binary tree is also called the width of the tree Question P10: Write a function to find out the inorder successor of a given node in a binary tree. The inputs to the function are a pointer to the root of the tree and a pointer to a node. The function returns a pointer to the inorder successor of the given node. Question P11: Write a function to find out the inorder predecessor of a given node in a binary tree. The inputs to the function are a pointer to the root of the tree and a pointer to a node. The function returns a pointer to the inorder predecessor of the given node. Question P12: Write a function to compute the internal path length of a binary tree. Question P13: Write a function to compute the external path length of a binary tree. Question P14:Write a function to delete a node from a binary search tree which ultimately deletes the inorder predecessor of the node to be deleted if the node has exactly two non empty children. Question P15: Write a function to check whether a given binary search tree is an VL tree or not. Question P16: Write a non recursive function to insert a node in VL tree. Question P17: Write a non recursive function to delete a node from an VL tree. Question P18: Write a recursive function to delete a node from an VL tree. Question P19: Write a function to merge the nodes of two VL trees to obtain a new VL tree. Question P20: Write functions to find the immediate predecessor and immediate successor of a given key value in a B-tree. Question P21: Write a function to insert a new key to a B-tree of order m. Question P22: Write a function to delete an existing key from a B-tree of order m. Section N: Command Line rguments Bitwise Operators
10CS35: Data Structures Using C
CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a
More informationPES Institute of Technology-BSC QUESTION BANK
PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions
More informationDATA STRUCTURES USING C
DATA STRUCTURES USING C QUESTION BANK UNIT I 1. Define data. 2. Define Entity. 3. Define information. 4. Define Array. 5. Define data structure. 6. Give any two applications of data structures. 7. Give
More informationI PUC - Computer Science. Practical s Syllabus. Contents
I PUC - Computer Science Practical s Syllabus Contents Topics 1 Overview Of a Computer 1.1 Introduction 1.2 Functional Components of a computer (Working of each unit) 1.3 Evolution Of Computers 1.4 Generations
More information1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++
Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The
More informationCOMPUTER SCIENCE. Paper 1 (THEORY)
COMPUTER SCIENCE Paper 1 (THEORY) (Three hours) Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) -----------------------------------------------------------------------------------------------------------------------
More informationData Structure [Question Bank]
Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:
More informationUnit 1. 5. Write iterative and recursive C functions to find the greatest common divisor of two integers. [6]
Unit 1 1. Write the following statements in C : [4] Print the address of a float variable P. Declare and initialize an array to four characters a,b,c,d. 2. Declare a pointer to a function f which accepts
More informationKrishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C
Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate
More informationSyllabus for Computer Science. Proposed scheme for B.Sc Programme under Choice Based Credit System
Syllabus for Computer Science Proposed scheme for B.Sc Programme under Choice Based Credit System SEMESTER - I Code Course Title Course Type HPW Credits BS106 SEMESTER -I I BS 206 SEMESTER -III BS 301
More informationALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)
ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) Subject Description: This subject deals with discrete structures like set theory, mathematical
More informationGUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704)
GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT Course Curriculum DATA STRUCTURES (Code: 3330704) Diploma Programme in which this course is offered Semester in which offered Computer Engineering,
More informationSample Questions Csci 1112 A. Bellaachia
Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k
More informationObjected oriented Programming: C++ Unit 1 1. Introduction 1.1. Introduction to Object Oriented Programming. 1.2. C++ fundamentals.
Gujarat University Choice Based Credit System (CBCS) Syllabus for B. Sc. Semester III (Computer Science) COM 201: DATA STRUCTURE USING C++ (Theory) Hours: 4 /week Credits: 4 Objected oriented Programming:
More informationBCS2B02: OOP Concepts and Data Structures Using C++
SECOND SEMESTER BCS2B02: OOP Concepts and Data Structures Using C++ Course Number: 10 Contact Hours per Week: 4 (2T + 2P) Number of Credits: 2 Number of Contact Hours: 30 Hrs. Course Evaluation: Internal
More informationQuestions 1 through 25 are worth 2 points each. Choose one best answer for each.
Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in
More informationPART-A Questions. 2. How does an enumerated statement differ from a typedef statement?
1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members
More informationData Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010
Data Structure and Algorithm I Midterm Examination 120 points Time: 9:10am-12:10pm (180 minutes), Friday, November 12, 2010 Problem 1. In each of the following question, please specify if the statement
More informationALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite
ALGEBRA Pupils should be taught to: Generate and describe sequences As outcomes, Year 7 pupils should, for example: Use, read and write, spelling correctly: sequence, term, nth term, consecutive, rule,
More informationAP Computer Science Java Mr. Clausen Program 9A, 9B
AP Computer Science Java Mr. Clausen Program 9A, 9B PROGRAM 9A I m_sort_of_searching (20 points now, 60 points when all parts are finished) The purpose of this project is to set up a program that will
More informationLaboratory Assignments of OBJECT ORIENTED METHODOLOGY & PROGRAMMING (USING C++) [IT 553]
Laboratory Assignments of OBJECT ORIENTED METHODOLOGY & PROGRAMMING (USING C++) [IT 553] Books: Text Book: 1. Bjarne Stroustrup, The C++ Programming Language, Addison Wesley 2. Robert Lafore, Object-Oriented
More informationHow do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.
The verbal answers to all of the following questions should be memorized before completion of pre-algebra. Answers that are not memorized will hinder your ability to succeed in algebra 1. Number Basics
More informationMAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push) -----------------------------------------
=============================================================================================================================== DATA STRUCTURE PSEUDO-CODE EXAMPLES (c) Mubashir N. Mir - www.mubashirnabi.com
More informationBangalore University B.Sc Computer Science Syllabus ( Semester System)
Bangalore University B.Sc Computer Science Syllabus ( Semester System) First Semester CSIT1: Computer Fundamentals and C Programming CSIP1: C Programming Lab Second Semester CSIIT1: Data Structures and
More informationThe following themes form the major topics of this chapter: The terms and concepts related to trees (Section 5.2).
CHAPTER 5 The Tree Data Model There are many situations in which information has a hierarchical or nested structure like that found in family trees or organization charts. The abstraction that models hierarchical
More informationConverting a Number from Decimal to Binary
Converting a Number from Decimal to Binary Convert nonnegative integer in decimal format (base 10) into equivalent binary number (base 2) Rightmost bit of x Remainder of x after division by two Recursive
More informationQuick Reference ebook
This file is distributed FREE OF CHARGE by the publisher Quick Reference Handbooks and the author. Quick Reference ebook Click on Contents or Index in the left panel to locate a topic. The math facts listed
More information1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.
1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated
More informationUIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming
UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming 1 2 Foreword First of all, this book isn t really for dummies. I wrote it for myself and other kids who are on the team. Everything
More informationKITES TECHNOLOGY COURSE MODULE (C, C++, DS)
KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL
More informationMath 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.
Math 0980 Chapter Objectives Chapter 1: Introduction to Algebra: The Integers. 1. Identify the place value of a digit. 2. Write a number in words or digits. 3. Write positive and negative numbers used
More informationECE 250 Data Structures and Algorithms MIDTERM EXAMINATION 2008-10-23/5:15-6:45 REC-200, EVI-350, RCH-106, HH-139
ECE 250 Data Structures and Algorithms MIDTERM EXAMINATION 2008-10-23/5:15-6:45 REC-200, EVI-350, RCH-106, HH-139 Instructions: No aides. Turn off all electronic media and store them under your desk. If
More informationData Structures. Level 6 C30151. www.fetac.ie. Module Descriptor
The Further Education and Training Awards Council (FETAC) was set up as a statutory body on 11 June 2001 by the Minister for Education and Science. Under the Qualifications (Education & Training) Act,
More informationMATHCOUNTS TOOLBOX Facts, Formulas and Tricks
MATHCOUNTS TOOLBOX Facts, Formulas and Tricks MATHCOUNTS Coaching Kit 40 I. PRIME NUMBERS from 1 through 100 (1 is not prime!) 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 II.
More information5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.
1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The
More informationSystems I: Computer Organization and Architecture
Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x
More informationTo Evaluate an Algebraic Expression
1.5 Evaluating Algebraic Expressions 1.5 OBJECTIVES 1. Evaluate algebraic expressions given any signed number value for the variables 2. Use a calculator to evaluate algebraic expressions 3. Find the sum
More informationSQUARE-SQUARE ROOT AND CUBE-CUBE ROOT
UNIT 3 SQUAREQUARE AND CUBEUBE (A) Main Concepts and Results A natural number is called a perfect square if it is the square of some natural number. i.e., if m = n 2, then m is a perfect square where m
More informationHome Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit
Data Structures Page 1 of 24 A.1. Arrays (Vectors) n-element vector start address + ielementsize 0 +1 +2 +3 +4... +n-1 start address continuous memory block static, if size is known at compile time dynamic,
More informationPositional Numbering System
APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated
More informationBinary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R
Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent
More informationLab Manual. Data Structures (Pr): COT-213 Data Structures (P): IT-215
Lab Manual Data Structures (Pr): COT-213 Data Structures (P): IT-215 !" #$%&'() * +, -. 951/6201617535973417*37311 235678976: ;7A
More informationA TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION
A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used
More informationMath 0306 Final Exam Review
Math 006 Final Exam Review Problem Section Answers Whole Numbers 1. According to the 1990 census, the population of Nebraska is 1,8,8, the population of Nevada is 1,01,8, the population of New Hampshire
More informationAnalysis of Algorithms I: Binary Search Trees
Analysis of Algorithms I: Binary Search Trees Xi Chen Columbia University Hash table: A data structure that maintains a subset of keys from a universe set U = {0, 1,..., p 1} and supports all three dictionary
More informationOrdered Lists and Binary Trees
Data Structures and Algorithms Ordered Lists and Binary Trees Chris Brooks Department of Computer Science University of San Francisco Department of Computer Science University of San Francisco p.1/62 6-0:
More informationFlorida Math 0018. Correlation of the ALEKS course Florida Math 0018 to the Florida Mathematics Competencies - Lower
Florida Math 0018 Correlation of the ALEKS course Florida Math 0018 to the Florida Mathematics Competencies - Lower Whole Numbers MDECL1: Perform operations on whole numbers (with applications, including
More information5: Magnitude 6: Convert to Polar 7: Convert to Rectangular
TI-NSPIRE CALCULATOR MENUS 1: Tools > 1: Define 2: Recall Definition --------------- 3: Delete Variable 4: Clear a-z 5: Clear History --------------- 6: Insert Comment 2: Number > 1: Convert to Decimal
More information1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.
Study Group 1 Variables and Types 1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier. 2. What does the byte 00100110 represent? 3. What is the purpose of the declarations
More informationCOMPETENCY TEST SAMPLE TEST. A scientific, non-graphing calculator is required for this test. C = pd or. A = pr 2. A = 1 2 bh
BASIC MATHEMATICS COMPETENCY TEST SAMPLE TEST 2004 A scientific, non-graphing calculator is required for this test. The following formulas may be used on this test: Circumference of a circle: C = pd or
More informationData Structures and Data Manipulation
Data Structures and Data Manipulation What the Specification Says: Explain how static data structures may be used to implement dynamic data structures; Describe algorithms for the insertion, retrieval
More informationCharlesworth School Year Group Maths Targets
Charlesworth School Year Group Maths Targets Year One Maths Target Sheet Key Statement KS1 Maths Targets (Expected) These skills must be secure to move beyond expected. I can compare, describe and solve
More informationA Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions
A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions Marcel B. Finan Arkansas Tech University c All Rights Reserved First Draft February 8, 2006 1 Contents 25
More informationData Structures Fibonacci Heaps, Amortized Analysis
Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:
More informationPseudo code Tutorial and Exercises Teacher s Version
Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy
More informationHow To Solve Factoring Problems
05-W4801-AM1.qxd 8/19/08 8:45 PM Page 241 Factoring, Solving Equations, and Problem Solving 5 5.1 Factoring by Using the Distributive Property 5.2 Factoring the Difference of Two Squares 5.3 Factoring
More informationFlorida Math 0028. Correlation of the ALEKS course Florida Math 0028 to the Florida Mathematics Competencies - Upper
Florida Math 0028 Correlation of the ALEKS course Florida Math 0028 to the Florida Mathematics Competencies - Upper Exponents & Polynomials MDECU1: Applies the order of operations to evaluate algebraic
More informationUnit 6. Loop statements
Unit 6 Loop statements Summary Repetition of statements The while statement Input loop Loop schemes The for statement The do statement Nested loops Flow control statements 6.1 Statements in Java Till now
More informationBinary Trees and Huffman Encoding Binary Search Trees
Binary Trees and Huffman Encoding Binary Search Trees Computer Science E119 Harvard Extension School Fall 2012 David G. Sullivan, Ph.D. Motivation: Maintaining a Sorted Collection of Data A data dictionary
More informationCommon Data Structures
Data Structures 1 Common Data Structures Arrays (single and multiple dimensional) Linked Lists Stacks Queues Trees Graphs You should already be familiar with arrays, so they will not be discussed. Trees
More informationStacks. Linear data structures
Stacks Linear data structures Collection of components that can be arranged as a straight line Data structure grows or shrinks as we add or remove objects ADTs provide an abstract layer for various operations
More informationMathematics Pre-Test Sample Questions A. { 11, 7} B. { 7,0,7} C. { 7, 7} D. { 11, 11}
Mathematics Pre-Test Sample Questions 1. Which of the following sets is closed under division? I. {½, 1,, 4} II. {-1, 1} III. {-1, 0, 1} A. I only B. II only C. III only D. I and II. Which of the following
More informationThe string of digits 101101 in the binary number system represents the quantity
Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for
More informationAlgorithms and Data Structures
Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2
More informationExpression. Variable Equation Polynomial Monomial Add. Area. Volume Surface Space Length Width. Probability. Chance Random Likely Possibility Odds
Isosceles Triangle Congruent Leg Side Expression Equation Polynomial Monomial Radical Square Root Check Times Itself Function Relation One Domain Range Area Volume Surface Space Length Width Quantitative
More informationBinary Search Trees CMPSC 122
Binary Search Trees CMPSC 122 Note: This notes packet has significant overlap with the first set of trees notes I do in CMPSC 360, but goes into much greater depth on turning BSTs into pseudocode than
More informationExam study sheet for CS2711. List of topics
Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure
More informationB.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011
NEW Detailed Syllabus of B.Sc.(Computer Science) and B.Sc.(IT) Effective From July 2011 SEMESTER SYSTEM Scheme & Syllabus for B.Sc. (CS) Pass and Hons. Course Effective from July 2011 and onwards CLASS
More informationIntroduction to the TI-Nspire CX
Introduction to the TI-Nspire CX Activity Overview: In this activity, you will become familiar with the layout of the TI-Nspire CX. Step 1: Locate the Touchpad. The Touchpad is used to navigate the cursor
More informationChapter 3. if 2 a i then location: = i. Page 40
Chapter 3 1. Describe an algorithm that takes a list of n integers a 1,a 2,,a n and finds the number of integers each greater than five in the list. Ans: procedure greaterthanfive(a 1,,a n : integers)
More informationScope and Sequence KA KB 1A 1B 2A 2B 3A 3B 4A 4B 5A 5B 6A 6B
Scope and Sequence Earlybird Kindergarten, Standards Edition Primary Mathematics, Standards Edition Copyright 2008 [SingaporeMath.com Inc.] The check mark indicates where the topic is first introduced
More informationA binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:
Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)
More information26 Integers: Multiplication, Division, and Order
26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue
More informationBinary Search Trees (BST)
Binary Search Trees (BST) 1. Hierarchical data structure with a single reference to node 2. Each node has at most two child nodes (a left and a right child) 3. Nodes are organized by the Binary Search
More informationDigital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur
Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture
More informationData Structure with C
Subject: Data Structure with C Topic : Tree Tree A tree is a set of nodes that either:is empty or has a designated node, called the root, from which hierarchically descend zero or more subtrees, which
More informationBinary Heap Algorithms
CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn G. Chappell
More informationSYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison
SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections
More informationof surface, 569-571, 576-577, 578-581 of triangle, 548 Associative Property of addition, 12, 331 of multiplication, 18, 433
Absolute Value and arithmetic, 730-733 defined, 730 Acute angle, 477 Acute triangle, 497 Addend, 12 Addition associative property of, (see Commutative Property) carrying in, 11, 92 commutative property
More informationLecture 11 Doubly Linked Lists & Array of Linked Lists. Doubly Linked Lists
Lecture 11 Doubly Linked Lists & Array of Linked Lists In this lecture Doubly linked lists Array of Linked Lists Creating an Array of Linked Lists Representing a Sparse Matrix Defining a Node for a Sparse
More informationCOMPUTER SCIENCE 1999 (Delhi Board)
COMPUTER SCIENCE 1999 (Delhi Board) Time allowed: 3 hours Max. Marks: 70 Instructions: (i) All the questions are compulsory. (ii) Programming Language: C++ QUESTION l. (a) Why main function is special?
More informationModuMath Basic Math Basic Math 1.1 - Naming Whole Numbers Basic Math 1.2 - The Number Line Basic Math 1.3 - Addition of Whole Numbers, Part I
ModuMath Basic Math Basic Math 1.1 - Naming Whole Numbers 1) Read whole numbers. 2) Write whole numbers in words. 3) Change whole numbers stated in words into decimal numeral form. 4) Write numerals in
More informationAP Computer Science AB Syllabus 1
AP Computer Science AB Syllabus 1 Course Resources Java Software Solutions for AP Computer Science, J. Lewis, W. Loftus, and C. Cocking, First Edition, 2004, Prentice Hall. Video: Sorting Out Sorting,
More informationFOREWORD. Executive Secretary
FOREWORD The Botswana Examinations Council is pleased to authorise the publication of the revised assessment procedures for the Junior Certificate Examination programme. According to the Revised National
More informationBase Conversion written by Cathy Saxton
Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,
More informationAtmiya Infotech Pvt. Ltd. Data Structure. By Ajay Raiyani. Yogidham, Kalawad Road, Rajkot. Ph : 572365, 576681 1
Data Structure By Ajay Raiyani Yogidham, Kalawad Road, Rajkot. Ph : 572365, 576681 1 Linked List 4 Singly Linked List...4 Doubly Linked List...7 Explain Doubly Linked list: -...7 Circular Singly Linked
More information7.1 Our Current Model
Chapter 7 The Stack In this chapter we examine what is arguably the most important abstract data type in computer science, the stack. We will see that the stack ADT and its implementation are very simple.
More informationAlgebra 1. Practice Workbook with Examples. McDougal Littell. Concepts and Skills
McDougal Littell Algebra 1 Concepts and Skills Larson Boswell Kanold Stiff Practice Workbook with Examples The Practice Workbook provides additional practice with worked-out examples for every lesson.
More informationFourth Grade Math Standards and "I Can Statements"
Fourth Grade Math Standards and "I Can Statements" Standard - CC.4.OA.1 Interpret a multiplication equation as a comparison, e.g., interpret 35 = 5 x 7 as a statement that 35 is 5 times as many as 7 and
More information13 Classes & Objects with Constructors/Destructors
13 Classes & Objects with Constructors/Destructors 13.1 Introduction In object oriented programming, the emphasis is on data rather than function. Class is a way that binds the data & function together.
More informationChapter 4: Computer Codes
Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data
More informationJava Software Structures
INTERNATIONAL EDITION Java Software Structures Designing and Using Data Structures FOURTH EDITION John Lewis Joseph Chase This page is intentionally left blank. Java Software Structures,International Edition
More informationFunctions Recursion. C++ functions. Declare/prototype. Define. Call. int myfunction (int ); int myfunction (int x){ int y = x*x; return y; }
Functions Recursion C++ functions Declare/prototype int myfunction (int ); Define int myfunction (int x){ int y = x*x; return y; Call int a; a = myfunction (7); function call flow types type of function
More informationBasic Use of the TI-84 Plus
Basic Use of the TI-84 Plus Topics: Key Board Sections Key Functions Screen Contrast Numerical Calculations Order of Operations Built-In Templates MATH menu Scientific Notation The key VS the (-) Key Navigation
More information2014 Chapter Competition Solutions
2014 Chapter Competition Solutions Are you wondering how we could have possibly thought that a Mathlete would be able to answer a particular Sprint Round problem without a calculator? Are you wondering
More information9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements
9 Control Statements 9.1 Introduction The normal flow of execution in a high level language is sequential, i.e., each statement is executed in the order of its appearance in the program. However, depending
More informationAny two nodes which are connected by an edge in a graph are called adjacent node.
. iscuss following. Graph graph G consist of a non empty set V called the set of nodes (points, vertices) of the graph, a set which is the set of edges and a mapping from the set of edges to a set of pairs
More informationCS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team
CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A
More informationTREE BASIC TERMINOLOGIES
TREE Trees are very flexible, versatile and powerful non-liner data structure that can be used to represent data items possessing hierarchical relationship between the grand father and his children and
More informationChapter 2: Elements of Java
Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction
More information