main()
{
{
unsigned int bit=256;
printf("%d", bit);
}
{
unsigned int bit=512;
printf("%d", bit);
}
}
a. 256, 256
b. 512, 512
c. 256, 512
d. Compile error
Answer / guest
256, 512, becoz these r different blocks, so declaration
allowed
| Is This Answer Correct ? | 21 Yes | 0 No |
Program to find the largest sum of contiguous integers in the array. O(n)
Derive expression for converting RGB color parameters to HSV values
Write a C function to search a number in the given list of numbers. donot use printf and scanf
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }
how to return a multiple value from a function?
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).
13 Answers Intel, Microsoft, TCS,
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }