Is there any difference between the two declarations,
1. int foo(int *arr[]) and
2. int foo(int *arr[2])
Answer / susie
Answer :
No
Explanation:
Functions can only pass pointers and not arrays. The numbers
that are allowed inside the [] is just for more readability.
So there is no difference between the two declarations.
| Is This Answer Correct ? | 1 Yes | 6 No |
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
what is oop?
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
what is variable length argument list?
main() { int a=10,*j; void *k; j=k=&a; j++; k++; printf("\n %u %u ",j,k); }
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }
Write a procedure to implement highlight as a blinking operation
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }