Posts

Showing posts from 2009

Whats the o/p of following

#define BUFF_SIZE 64*1024 UWord64 fileOffset; fileOffset = readFromFile(BUFF_SIZE); /* above fn returned BUFF_SIZE */ fileOffset -= BUFF_SIZE - 71444;/* 17444=0x11714 */ Options: 1. 18446744069414655764 or 0xffff ffff 0001 1714 2. 71444 or 0x1 1714 Soln: BUFF_SIZE - 71444 i.e 65536 - 71444 is converted to 2's compliment form in Word32 format which is 0xffff e8ec. That value is subtracted from 0x0000 0000 0001 0000. So option 1 is the ans.

वाजवी पावा गोविंद (beautiful Bhimpalas by Babuji)

शरदाचे चांदणे मधुबनी फुलला निशीगंध नाचतो गोपीजन वृंद वाजवी पावा गोविंद ॥ धृ ॥ पैंजण रुणझुणती मेखला कटिवर किणक़िणती वाहते यमुना जळ धुंद वाजवी पावा गोविंद ॥ गायिका: माणिक वर्मा गीत: ग. दि. माडगुळकर संगीत: सुधीर फडके

C quiz with answers

Q1. What is the form of variable name? A1. 1. Should not begin with digit. 2. Sequence of letters and digits. Q2. What are identifiers? A2. Identifiers = symbols. They can refer to 1. variables 2. type 3. functions 4. labels Q3. What are elements of C language? A3. Following 1. Operator 2. Keywords 3. Identifiers 4. Constants 5. String Literals 6. Punctuation and special characters Q4. What are tokens? A4. The basic element recognized by the compiler is the "token". A token is source-program text that the compiler does not break down into component elements. Note: Elements of C language are discussed above.

L-values and R-values

Expressions in C++ can evaluate to l-values or r-values. L-values are expressions that evaluate to a type other than void and that designate a variable. L-values appear on the left side of an assignment statement (hence the "l" in l-value). Variables that would normally be l-values can be made nonmodifiable by using the const keyword; these cannot appear on the left of an assignment statement. Reference types are always l-values. The term r-value is sometimes used to describe the value of an expression and to distinguish it from an l-value. All l-values are r-values but not all r-values are l-values. // lValues_rValues.cppint main() { int i, j, *p; i = 7; // OK variable name is an l-value. 7 = i; // C2106 constant is an r-value. j * 4 = 7; // C2106 expression j * 4 yields an r-value. *p = i; // OK a dereferenced pointer is an l-value. const int ci = 7; ci = 9; // C3892 ci is a nonmodifiable l-value ((i

Glossary of mobile telephony terms

Dual mode phones They can be used as a GSM or CDMA phone according to your preference. These are essentially 2 phones in one device. OR Mobile phones containing both cellular and non-cellular radios used for voice and data communication purpose. Cellular radio contains GSM/CDMA/W-CDMA and non-cellular contains technology like IEEE 802.11 (Wi-Fi) radio or DECT (Digital Enhanced Cordless Telecommunications) radio. These phones can be used as cellular phones when connected to a wide area cellular network. When within range of a suitable WiFi or DECT network, the phone can be used as a WiFi/DECT phone for all communications purposes. e.g. GSM and WiFi phones using VoIP POTS Plain old telephone service Wi-Fi A Wi-Fi enabled device such as a PC, game console, mobile phone, MP3 Player or PDA can connect to the internet when within range of a wireless network connected to the internet.

Tips to develop C code from scratch.....

I have been blessed to get a chance to really write a from scratch code (before that deciding directory structure and creating blank file also ;)) but simultaneously punished for proceeding directionlessly with the team (even when there was a team leader leader :P). Out of hard things I have learnt following lessons while going for a from scratch development. 1. Decide return codes first. I think all the robust codes are formed due to proper handling of return codes of functions calls. If an enumeration comprising of all the required return codes is finalized before hand then the module writers can effectively use them so that alongwith robustness there is a consistency among the modules. Also to finalize on error codes one has to fully know what he wants to do - the big big key for success. 2. Decide upon coding style Yes, this has to be taken next. If you don't take it now you will never take it later when your code is functional. Even if you take it with lot of resolve (an of co...