how does a general function , that accepts an array as a
parameter, "knows" the size of the array ?
How should it define it parameters list ?
Answers were Sorted based on User's Feedback
Answer / ilana
one option :
myfunc (int my_array[], int n ) { ...}
another option:
myfunc (int *my_array, int n ) { ...}
Is This Answer Correct ? | 12 Yes | 5 No |
Answer / ganesh bankar
its compilers job to identify what is the size the array
depending upon which array is passed to the function.
Is This Answer Correct ? | 7 Yes | 1 No |
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
Write a program to find minimum between three no.s whithout using comparison operator.
explain how do you use macro?
what is printf
input any 4 digit number and find the difference of all the digits?
#include<stdio.h> int main(){ int a[]={1,2,3,5,1}; int *ptr=a+4; int y=ptr-a; printf("%d",y); }
What are the application of void data type in c?
#include<stdio.h> #include<conio.h> void main() { float a; clrscr(); a=0.5; if(a==0.5) printf("yes"); else printf("no"); getch(); }
Output for following program using for loop only * * * * * * * * * * * * * * *
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
Did c have any year 2000 problems?
write a program in c language that uses function to locate and return the smallest and largest integers in an array,number and their position in the array. it should also find and return the range of the numbers , that is , the difference between the largest number and the smallest.