PIXNET Logo登入

資訊鏟

跳到主文

很懶不喜歡更新的人

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 10月 02 週二 201210:23
  • Swap Variables in C without using Temporary Variable

Reference Link : http://offclassroom.com/off-classroom/cc/282-swap-variables-in-c-without-using-temporary-variable.html


Hello friends! Being a final year computer engineering student, I have gone through so many C programming logics as a preparation of Interview (unfortunately still haven't got a chance to face it :-)
Recently one of my friends cleared the first two rounds of aptitude & programming and then got a chance to face the interview. He was asked so many logical questions on C & C++ . One of those question was, “How many different methods do you know to swap two variables without using a temporary variable?”
From this question, we can't give a particular answer as there might be so many logical solutions that can be used to swap two variables. I certainly know three:

Method 1: Swap two variables using + & - operators
(繼續閱讀...)
文章標籤

techdrew 發表在 痞客邦 留言(0) 人氣(56)

  • 個人分類:隨手筆記
▲top
  • 2月 23 週四 201204:20
  • 1+4+9+25...+n^2 Harmonic Series with n square

Formula:
 
1+4+9+25+...+n^2 = (n(n+1)(2n+1)) / 6
(繼續閱讀...)
文章標籤

techdrew 發表在 痞客邦 留言(0) 人氣(19)

  • 個人分類:隨手筆記
▲top
  • 4月 27 週二 201023:23
  • 薛丁格的貓(Schrödinger's cat)

薛丁格的貓薛丁格的貓是奧地利物理學家埃爾溫·薛定諤用來解釋在宏觀情況下量力子學還不完整的假想性實驗
實驗內容大意:
1. 將一隻貓,放射性原子核,和一個毒氣瓶放到一個密閉的箱子裡
(繼續閱讀...)
文章標籤

techdrew 發表在 痞客邦 留言(0) 人氣(146)

  • 個人分類:隨手筆記
▲top
1

熱門文章

  • (105)中國微軟抄襲plurk微網誌
  • (23)地圖日記最近流量大增的原因?!
  • (151)MIR:ROR Violet 公司出的新產品 RFID的家用型態?
  • (642)改變你螢幕的亮度 讓你晚上看螢幕不再刺眼 和 更舒適的睡眠
  • (8)GOOGLE在上次的發表會上推出的 "Real Time Search"
  • (37)Google Square
  • (105)抄襲噗浪程式碼 微軟認了
  • (62)工研院偕台廠 推出全球第一片USB 3.0薄型記憶卡
  • (569)CHROME外掛-GOOGLE短網址生產器(goo.gl)
  • (8)Google goggles 拍立尋 將不是概念

文章分類

  • 網路生活 (6)
  • 隨手筆記 (3)
  • windows 7 (1)
  • google (6)
  • 免費軟體 (4)
  • 產品資訊 (2)
  • 未分類文章 (1)

最新文章

  • Android: One line code to have multi-image in one viewpager
  • Java Code: Upload files to php server
  • how to download image from any web page in java
  • Swap Variables in C without using Temporary Variable
  • 1+4+9+25...+n^2 Harmonic Series with n square
  • 關閉windows 7 系統音效
  • 用chrome的擴充軟件下載FACEBOOK整本相簿
  • Launchy 2.5 :: 超快速開啟檔案
  • Min.us 一個超簡單分享照片的網站
  • 超好用的網路電視機PPS

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: