Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %..

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

void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %..

Answer / lucky varshney

here in 3
7

Is This Answer Correct ?    4 Yes 6 No

void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %..

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

Post New Answer

More C Code Interview Questions

what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);

2 Answers  


void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }

1 Answers  


typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 Answers  


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,


Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])

1 Answers  


Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false

1 Answers   Cognizant, lenovo,


Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];

1 Answers  


respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"

1 Answers   Genpact, Ozdocs,


void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }

4 Answers  


Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

9 Answers   Microsoft,


prog. to produce 1 2 3 4 5 6 7 8 9 10

4 Answers   TCS,


#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); }

1 Answers  


Categories