Integers-Introduction to Programming-Lab Mannual, Exercises of Computer Programming

This is lab manual in form of lecture slides for Introduction to Programming course. It was delivered by Prof. Abhimoda Arora at Alagappa University. It includes: Integers, Array, Value, Occurence, Shofting, Element, Program, Display, Appending, Code, Reverse, Order

Typology: Exercises

2011/2012

Uploaded on 07/31/2012

dhairya
dhairya ๐Ÿ‡ฎ๐Ÿ‡ณ

5

(4)

32 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
LAB TASK 1
๎€ŠWrite a program that asks the user to type 10
integers of an array and an integer value V. The
program must search if the value V exists in the
array and must remove the first occurrence of
V, shifting each following element left and
adding a zero at the end of the array. The
program must then write and display the final
array.
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Integers-Introduction to Programming-Lab Mannual and more Exercises Computer Programming in PDF only on Docsity!

๎€Š Write a program that asks the user to type 10 integers of an array and an integer value V. The program must search if the value V exists in the array and must remove the first occurrence of V, shifting each following element left and adding a zero at the end of the array. The program must then write and display the final array.

๎€Š Write a program that asks the user to type 10 integers of an array and an integer value V and an index value i between 0 and 9. The program must put the value V at the place i in the array, shifting each element right and dropping off the last element. The program must then write the final array.

๎€Š Write a piece of code which prints the characters in a cstring in a reverse order. ๎€Š char s[10] = "abcde"; ๎€Š char* cptr; ๎€Š ๎€Š // WRITE YOUR CODE HERE

๎€Š Write a program that outputs all the prime numbers till the number entered by the user

๎€Š Perform 4-letter WORD UNSCRAMBLING i.e. List all possible combinations of 4-letters in a word. Ex: The word 'TEST' can be unscrambled as TEST,TETS,TSET,TSTE,TTSE,TTES,etc.