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 |
#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225 c. 15 d. none of the above
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
Write a program that find and print how many odd numbers in a binary tree
/*what is the output for*/ void main() { int r; printf("Naveen"); r=printf(); getch(); }
main( ) { int a[ ] = {10,20,30,40,50},j,*p; for(j=0; j<5; j++) { printf(“%d” ,*a); a++; } p = a; for(j=0; j<5; j++) { printf(“%d ” ,*p); p++; } }
String reverse with time complexity of n/2 with out using temporary variable.
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
can u give me the c codings for converting a string into the hexa decimal form......
What is the hidden bug with the following statement? assert(val++ != 0);
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
what is brs test reply me email me kashifabbas514@gmail.com