void main()
{
int *mptr, *cptr;
mptr = (int*)malloc(sizeof(int));
printf(“%d”,*mptr);
int *cptr = (int*)calloc(sizeof(int),1);
printf(“%d”,*cptr);
}
Answer / susie
Answer :
garbage-value 0
Explanation:
The memory space allocated by malloc is uninitialized,
whereas calloc returns the allocated memory space
initialized to zeros.
| Is This Answer Correct ? | 2 Yes | 1 No |
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
write the function. if all the character in string B appear in string A, return true, otherwise return false.
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
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=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
main() { int i=5; printf("%d",++i++); }
#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?
main() { int i=400,j=300; printf("%d..%d"); }
abcdedcba abc cba ab ba a a
How to reverse a String without using C functions ?
33 Answers Matrix, TCS, Wipro,
Find your day from your DOB?
15 Answers Accenture, Microsoft,
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates.
19 Answers Amazon, BITS, Microsoft, Syncfusion, Synergy, Vector,