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...

Unsigned char c;
for ( c=0;c!=256;c++2)
printf("%d",c);

No. of times the loop is executed ?

Answer Posted / manishsoni

It produce compile time error becoz the statement c++2 is
not allowed here.

if this statement is written as c+=2,then it will give us an
infinite loop between
0--->254----->0---->254...
because it check simply c!=256(mean c is not equal to
256,mean it simply it didnot print the value at 256,that
mean it did not print 256...after 254...and print 0)
------------------------------------------------------------
No. of times the loop is executed ?
------------------------------------------------------------
loop will execute 128 times becoz:
the loop is increased each time by 2 and loop is execute
254 time without zero so
254/2=127
127+1(zero)=128;
so the loop is execute 128 times....
BY:ManisH SonI(MoNu)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain can the sizeof operator be used to tell the size of an array passed to a function?

1080


Why ca not I do something like this?

1018


‎How to define structures? · ‎

1102


What is a newline escape sequence?

1110


Are enumerations really portable?

1036


How can you find out how much memory is available?

1073


What is #define used for in c?

1068


What is c language in simple words?

1073


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2365


What is header file definition?

1091


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1140


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1828


How is a structure member accessed?

1145


difference between native and cross compilers

2140


What is a structure in c language. how to initialise a structure in c?

1067