Upwork General Programming

/Upwork General Programming

Visual Basic 6 Test

1. An ADO dynamic property is: Answers: A property that changes value at runtime A value defined by the user A value defined by the operating system A property that dynamically resizes as needed to accommodate database parameters A property implemented by the OLE DB service provider 2. In order to provide a transparent background [...]

By | October 21st, 2015|Upwork General Programming|4 Comments

System Programming Test

1. Which of the following system calls can be used to send a message via a connected socket? Answers: send sendto sendmsg write 2. Which of the following methods can be used as a communication mechanism between two unrelated processes? Answers: A pipe using the pipe system call. A named pipe using the mknod system [...]

By | October 21st, 2015|Upwork General Programming|0 Comments

Swift Test

1. Which of these is an appropriate syntax for dispatching a heavy operation to a background thread? Answers: dispatch_async(DISPATCH_QUEUE_PRIORITY_BACKGROUND), { self.heavyOperation() }) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), { self.heavyOperation() }) DISPATCH_QUEUE_PRIORITY_BACKGROUND({ self.heavyOperation() }) dispatch_async({ self.heavyOperation() }) 2. Which is the wrong definition of a protocol in Swift? Answers: protocol SomeProtocol { var first: Int{ get } } protocol [...]

By | October 20th, 2015|Upwork General Programming|3 Comments

Python Test

1. Which of the following will disable output buffering in Python? Answers: Using the -u command line switch class Unbuffered: def __init__(self, stream): self.stream = stream def write(self, data): self.stream.write(data) self.stream.flush() def __getattr__(self, attr): return getattr(self.stream, attr) import sys sys.stdout=Unbuffered(sys.stdout) Setting the PYTHONUNBUFFERED environment variable sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) 2. Which of the [...]

By | October 20th, 2015|Upwork General Programming|0 Comments

Programming with C Test

1. Which of the following statements will result in a compilation error? Answers: int n=5, x; x=n++; int n=5, x; x= ++n++; int n=5, x; x= (n+1)++; int n=5, x=6; x= (n+x)++; None of the above 2. Read the following two declaration statements. 1. #include <stdio.h> 2. #include "stdio.h" Which of the following statements pertaining [...]

By | October 20th, 2015|Upwork General Programming|0 Comments

Objective-C Test

1. What comments are supported in Obj-C? Answers: // Line comments /* Block comments */ # Line comments ; Line comments -[[ block comments ]] 2. What is a protocol? Answers: A class that uses functions instead of methods A method signature A class signature An interface without an implementation None of the above 3. [...]

By | October 20th, 2015|Upwork General Programming|0 Comments

Objective C Test

1. What's the difference between copy and deepCopy? Answers: They are the same deepCopy doesn't exist copy creates a copy at the first level, while deepCopy copies the instance variables copy creates a proxy object, while deepCopy allocate a new object None of the above 2. Which of the following can be inherited? Answers: Categories [...]

By | October 20th, 2015|Upwork General Programming|0 Comments

iPhone Programming OS 2.1 Test

1. Which of the following languages can be used to write the code for Xcode projects? Answers: C C++ Objective-C Objective-C++ Java 2. Which of the following need to be modified while localizing an application? Answers: Nib files (windows, views, menus). Static text. Icons and graphics. Dynamic text generated by your program. 3. Which of [...]

By | October 20th, 2015|Upwork General Programming|0 Comments

Game Programming Concepts Test

1. What is true regarding DirectX and OpenGL? Answers: DirectX is a collection of API for games programming. DirectX is much faster than OpenGL. DirectX is more frequently used in professional graphics. OpenGL is an open standard. OpenGL is multi-platform. 2. Shadow volumes use per-pixel lighting. Answers: True False 3. What does dereferencing mean in [...]

By | October 20th, 2015|Upwork General Programming|0 Comments

Dot Net Fundamentals Test

1. Which of the following are included in a Static assembly? Answers: Modules Type metadata MSIL code Assembly manifest 2. Which of the following are the main goals behind ADO .NET? Answers: To provide seamless support for XML To support COM directly To provide an expandable and scalable data access architecture for the revolutionary n-tier [...]

By | October 20th, 2015|Upwork General Programming|0 Comments