what type of errors are checked during compilation
Answer Posted / rajasekharreddy
#include<stdio.h>
#define SIZE 10
int main()
{
int arr[SIZE],i,arr_Size,position;
printf("enter array size\t");
scanf("%d",&arr_Size);
printf("enter numbers\t");
for(i=0;i<arr_Size;i++)
{
scanf("%d",&arr[i]);
}
printf("before delete element\n");
for(i=0;i<arr_Size;i++)
{
printf("\t%d",arr[i]);
}
printf("\nenter position to delete\t");
scanf("%d",&position);
--position;
arr[position]=0;
for(i=position;i<(arr_Size-1);i++)
{
arr[i]=arr[i+1];
}
arr_Size--;
printf("after delete element\n");
for(i=0;i<arr_Size;i++)
{
printf("\t%d",arr[i]);
}
return 0;
}
Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is a floating point in c?
What is the use of a static variable in c?
What are the types of c language?
What is the use of f in c?
Write a program that accept anumber in words
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What is a structural principle?
What is I ++ in c programming?
How can I list all of the predefined identifiers?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
What is the difference between declaring a variable by constant keyword and #define ing that variable?
string reverse using recursion
What are preprocessor directives in c?
Is it valid to address one element beyond the end of an array?
What are the 4 types of functions?