main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}
a. 2, 2
b. 2, 100
c. 4, 100
d. 4, 4
Answers were Sorted based on User's Feedback
Answer / ankit
ans is option d if ypu don't believe run it in compiler you vl get the answer
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / abhinav
answer is 1,2
because of character takes 1 byte
and ascii value of 100 is 2.
Is This Answer Correct ? | 0 Yes | 2 No |
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
main() { int i; i = abc(); printf("%d",i); } abc() { _AX = 1000; }
write the function. if all the character in string B appear in string A, return true, otherwise return false.
Finding a number which was log of base 2
main() { char a[4]="HELL"; printf("%s",a); }
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,
Write a program to print a square of size 5 by using the character S.
could you please send the program code for multiplying sparse matrix in c????
void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }