Primary Why is processing a sorted array faster than an unsorted array? Here is a piece of Visual C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster. #include <algorithm> #include <ctime> #include <iostream> int main() { // Generate data const unsigned arraySize = 32768; int data[arraySize]...
Primary What is the difference between #include <filename> and #include “filename”? The difference is in the location where the preprocessor searches for the included file. For #include "filename" the preprocessor searches in the same directory as the file containing the directive. This method is normally used to include programmer-defined header files. For #include <filename> the preprocessor searches...
Primary What are the differences between a pointer variable and a reference variable? * A pointer can be re-assigned: int x = 5; int y = 6; int *p; p = &x; p = &y; *p = 10; assert(x == 5); assert(y == 10); A reference cannot, and must be assigned at initialization: int x = 5; int y = 6; int &r = x; * A pointer has its...
Primary What is the name of the "-->" operator? Here's an example: #include <stdio.h> int main() { int x = 10; while( x --> 0 ) // x goes to 0 { printf("%d ", x); } } Answer --> is not an operator. It is in fact two separate operators, -- and >. The conditional's...
Swift Introduction to Swift - Swift Programming Language Swift is a new programming language for iOS, OS X, watchOS, and tvOS apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Development on Swift was begun in July 2010 by Chris Lattner, with the eventual collaboration of many other programmers at Apple....
Downloads Download Swift for Windows Swift is a general-purpose, multi-paradigm, compiled programming language created for iOS, OS X, watchOS, tvOS and Linux development by Apple Inc. -------------------------------------------------------------------------------- Update - 22 SEPTEMBER 2020 From 22 September 2020, the Swift project introduced new downloadable Swift toolchain images for Windows [https://swift.org/blog/swift-on-windows/]. These images contain...
Wiki Git Cheat Sheet (Git Commands) Git [https://git-scm.com/] is a version control system that is widely used for software development and other version control tasks. It is a distributed revision control system with an emphasis on speed, data integrity, and support for distributed, non-linear workflows. Git was initially designed and developed in 2005 by...
Wiki Google Advertising vs Facebook Advertising, which one better for Mobile App Campaigns? Mobile app installs campaigns are geared specifically toward getting more people to download your app. When more people download your app, you could improve your app store ranking, which in turn can result in even more people downloading your app. Here we going to discuss about two advertising platform Google...
iOS Alcatraz - The package manager for Xcode Alcatraz is an open-source package manager for Xcode 7+. It lets you discover and install plugins, templates and theme without the need for manually cloning or copying files. It installs itself as a part of Xcode and it feels like home. How to install Alcatraz? Installing Alcatraz is very easy....
Primary Quiz - Loops (for, while, do while, break, continue and goto) in C Programming This quiz is based on this Loops in C [https://developerinsider.co/2016/03/28/the-loop-control-structure-c-programming/] tutorial including introduction to for loop, while loop, do while loop, break, continue statement, and goto. So, To get better score on quiz, read the tutorial first. Poll Maker [http://www.poll-maker.com]...