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

52.write a “Hello World” program in “c” without using a
semicolon?
53.Give a method to count the number of ones in a 32 bit number?
54.write a program that print itself even if the source file
is deleted?
55.Given an unsigned integer, find if the number is power of 2?

Answer Posted / g

54:
you can load the source file to memory at the beginning of
the run using mmap(), or using one of the countless methods
to read from file in C and storing the data in a string
array, then it won't matter if the file is deleted, you can
always re-create it using the data in the process memory.

53/55: answering 53 also answers 55.

53:
int checkBits(x){
numOfOnes=0;
do{
if((x%2)!=0)
{numOfOnes++;}
x=x/2;
}while (x!=0);

return numOfOnes;
}

55:
int checkPower(x){
if(checkBits(x)==1)
{return 1;}
else{return 0;}
}

Is This Answer Correct ?    18 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the header files used in c language?

997


What is a program flowchart and how does it help in writing a program?

1087


What does %p mean?

1038


What is #line used for?

994


What are the types of c language?

983


How does pointer work in c?

1078


Explain the bubble sort algorithm.

1010


What is an array? What the different types of arrays in c?

1112


Explain what are bus errors, memory faults, and core dumps?

1228


Explain how do you override a defined macro?

1021


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

1015


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5403


i want to know the procedure of qualcomm for getting a job through offcampus

2414


What is the scope of local variable in c?

1053


Explain the properties of union. What is the size of a union variable

1134