#define DIM( array, type) sizeof(array)/sizeof(type)
main()
{
int arr[10];
printf(“The dimension of the array is %d”, DIM(arr,
int));
}
Answer / susie
Answer :
10
Explanation:
The size of integer array of 10 elements is 10 *
sizeof(int). The macro expands to sizeof(arr)/sizeof(int) =>
10 * sizeof(int) / sizeof(int) => 10.
| Is This Answer Correct ? | 3 Yes | 2 No |
Design an implement of the inputs functions for event mode
#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }
Is the following code legal? struct a { int x; struct a b; }
Finding a number which was log of base 2
how to check whether a linked list is circular.
Which version do you prefer of the following two, 1) printf(“%s”,str); // or the more curt one 2) printf(str);
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
How we will connect multiple client ? (without using fork,thread)
main() { extern int i; i=20; printf("%d",sizeof(i)); }
main() { float i=1.5; switch(i) { case 1: printf("1"); case 2: printf("2"); default : printf("0"); } }
What is data _null_? ,Explain with code when u need to use it in data step programming ?
Write a program that find and print how many odd numbers in a binary tree