#include<stdio.h>
main()
{
const int i=4;
float j;
j = ++i;
printf("%d %f", i,++j);
}
Answer / susie
Answer :
Compiler error
Explanation:
i is a constant. you cannot change the value of constant
Is This Answer Correct ? | 9 Yes | 1 No |
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
String reverse with time complexity of n/2 with out using temporary variable.
main() { int *j; { int i=10; j=&i; } printf("%d",*j); }
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
Write a single line c expression to delete a,b,c from aabbcc
char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }
main() { 41printf("%p",main); }8
main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513
3 Answers HCL, Logical Computers,
main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O