Answer Posted / naveen shukla
#include<stdio.h>
#include<stdlib.h>
int main(){
int n,i,t;
printf("Enter the size of the array");
scanf("%d",&n);
int *p=(int *)malloc(sizeof(int)*n);
for(i=0;i<n;i++){
printf("Enter the %d" i+1 "number in the array");
scanf("%d;t);
*(p+i)=t;
}
for(j=0;j<n-1;j++){
int pos=j;
int k=j+1;
int min=*(p+j);
while(k<n){
if(a[k]<min){
m=p[k];
pos=k;
}
k++;
}
int temp=p[pos];
p[pos]=a[j];
a[j]=temp;
}
return 0;
}
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How is a pointer variable declared?
List out few of the applications that make use of Multilinked Structures?
Can a variable be both constant and volatile?
What is a nested formula?
What are the types of unary operators?
What is getch () for?
Which built-in library function can be used to match a patter from the string?
What are external variables in c?
How can a number be converted to a string?
What are void pointers in c?
Is null equal to 0 in sql?
What is the difference between break and continue?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
What is getche() function?