what is the value of 'i'?

i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")




Answers were Sorted based on User's Feedback



Answer / vignesh1988i

THIS will be replaced as

4+6/3-5

the output is 1

Is This Answer Correct ?    21 Yes 1 No

Answer / guest

1(one)

Is This Answer Correct ?    17 Yes 1 No

Answer / jaya prakash

One Only

Is This Answer Correct ?    13 Yes 1 No




Answer / aditya

i=strlen("Blue")+strlen("People")/strlen("Red")-strlen
("green")
it is evaluated as
strlen("People")/strlen("Red")
6-4 as 2 then
strlen("Blue")+2
4+2 as 6 then
6-strlen("green")
6-5 as 1

Is This Answer Correct ?    11 Yes 1 No

Answer / abc

i = strlen("Blue")+ strlen("People")/ strlen("Red")- strlen
("green")
it is evaluated as
strlen("People")/ strlen("Red")
6 / 3 as 2 then
strlen("Blue")+ 2
4 + 2 as 6 then
6 - strlen("green")
6 - 5 as 1

Is This Answer Correct ?    5 Yes 1 No

Answer / vimal

1

Is This Answer Correct ?    1 Yes 0 No

Answer / mahesh

Strlen(BLUE)=4, strlen(people)=6, strlen(red)=3, strlen(green)= 5 so by BODMAS method we can slove this

4 + 6 / 3 - 5 = 4+2-5= 1
1st divison, 2nd addition, 3 rd subraction

Is This Answer Correct ?    1 Yes 0 No

Post New Answer



More C Interview Questions

helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.

3 Answers  


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

0 Answers   CLG,


what is the need for main function in c?

5 Answers  


How do I declare a pointer to an array?

6 Answers  


what is the output of the following program and explain the answer #include<stdio.h> exp() { main(5) } main(int a) { printf("%d",a); return; }

3 Answers   Satyam,






Fifty minutes ago if it was four times as many mints past 3 o clock. how many minutes is it to six o'clock n how....?????

3 Answers   TCS,


C program code int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15

6 Answers   TCS, Wipro,


class foo { public: static int func(const char*& p) const; }; This is illegal, why?

8 Answers   Google,


increment operateor (++)and decrament(--) #include<stdio.h> #inclide<conio.h> main() { int x=15; while(x!=0) scanf("%d",&x); {

2 Answers   Syntel, HCL, TCS,


what are two categories of clint-server application development ?

1 Answers  


what is the return type of printf

3 Answers  


int arr[] = {1,2,3,4} int *ptr=arr; *(arr+3) = *++ptr + *ptr++; Final contents of arr[]

6 Answers   Hughes,






Categories