void main()
{
char a[]="12345\0";
int i=strlen(a);
printf("here in 3 %d\n",++i);
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
here in 3 6
Explanation:
The char array 'a' will hold the initialized string, whose
length will be counted from 0 till the null character. Hence
the 'I' will hold the value equal to 5, after the
pre-increment in the printf statement, the 6 will be printed.
| Is This Answer Correct ? | 18 Yes | 4 No |
Answer / ravneet kaur
as this is a character array and would have string in double
quotes so this code shows an error i.e. *char wont changes
to *int.
| Is This Answer Correct ? | 0 Yes | 5 No |
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
write a program in c to merge two array
#include<stdio.h> int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
can u give me the c codings for converting a string into the hexa decimal form......
plz tell me the solution.......... in c language program guess any one number from 1 to 50 and tell that number within 8 asking question in yes or no...............
main() { extern out; printf("%d", out); } int out=100;
void main() { int i=5; printf("%d",i++ + ++i); }
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)
WAP to display 1,2,3,4,5........N