Given an array arr[] sorted in ascending order of size N and an integer K. Check if K is present in the array or not. (Use Binary Search)
Input: N = 5 K = 6 arr[] = {1,2,3,4,6}
Output: 1
Explanation: Since, 6 is present in the array at index 4 (0-based indexing),
Output is 1
Write a program that reads in a sequence of characters and prints them in reverse order (Use a stack).
Given an array array[], its starting position l and its ending position r. Sort the array using Bucket Sort algorithm.
Input: N = 10
array[] = {10 9 7 8 6 2 4 3 5 1}
Output: 1 2 3 4 5 6 7 8 9 10
To give you more of a challenge with a number's digits, let's try counting how many of a certain digit is present on a given number.
Let's start coding!
Instructions:
Input
A line containing two integers separated by a space.
2·124218Output
A line containing an integer.
2Create a program that will ask the user to input 9 integer numbers and display its vertical and horizontal sum. The numbers should be encoded in a 3 rows and 3 columns manner. After the user entered each set of numbers in a row, the horizontal sum of the set of numbers should automatically be shown.
Write a C Program to calculate the Average of an array elements where the elements are received as input.
Write a C program to input number from user and check number is palindrome or not using while loop.
Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.
Think you can handle the job?
Instructions:
Input
A line containing an integer.
214Output
A line containing an integer.
41. What do you mean by Program? Briefly describe the basic structure of C programs.
2. What is a token? Differentiate between a for loop and a while loop? What are it uses?
3. What is a data type? Differentiate between array and pointer. Write a program to interchange 2 variables without using the third one.
4. What is an array of pointers? Is it possible to have negative index in an array? Why is it necessary to give the size of an array in an array declaration?
5. Submit a Report "the impact of improving debugging skill on programming ability".