Correct Answer: When amount of memory to be allocated is known beforehand ie at the the time of compilation, it is known as Static Memory Allocation Once the memory is allocated statically, it cannot be deallocated during program run So it leads to wastage of storage space Example: int A[100]; When amount of memory to be allocated is not known beforehand, rather it is determined at the time of program run, it is called Dynamic Memory Allocation It leads to efficient utilization of storage space Example: cout << " Enter number of elements: "; cin >> N; int *A = new int[N]; // dynamic memory allocation
2. Why static methods cannot access non static variables or methods?
Correct Answer: A static method cannot access non static variables or methods because static methods doesnt need the object to be accessed So if a static method has non static variables or non static methods which has instantiated variables they will no be intialized since the object is not created and this could result in an error
Correct Answer: String Args (String []) is an array of parameters of type String In Java, 'args' contains the supplied command-line arguments as an array of String objects In other words, if you run your program as 'java MyProgram Hello World' then 'args' will contain ["Hello", "World"] When a java class is executed from the console, the main method is what is called
4. The syntax of capture events method for document object is..
Correct Answer: The JIT compiler is an important element of CLR, which loads MSIL on target machines for execution The MSIL is stored in NET assemblies after the developer has compiled the code written in any NET-compliant programming language, such as Visual Basic and C# JIT compiler translates the MSIL code of an assembly and uses the CPU architecture of the target machine to execute a NET application It also stores the resulting native code so that it is accessible for subsequent calls If a code executing on a target machine calls a non-native method, the JIT compiler converts the MSIL of that method into native code JIT compiler also enforces type-safety in runtime environment of NET Framework It checks for the values that are passed to parameters of any method For example, the JIT compiler detects any event, if a user tries to assign a 32-bit value to a parameter that can only accept 8-bit value
6. Which of the following gives the memory address of the first element in array?
Correct Answer: SBJson framework is supported by iOS It is a JSON parser and generator for Objective-C (Objective-C is the primary programming language you use when writing software for OS X and iOS It is a superset of the C-programming language and provides object-oriented capabilities and a dynamic runtime) SBJson provides flexible API's and additional control that makes JSON handling easy
Correct Answer: Intelligent Search and Siri- Intelligent Search is an excellent mechanism to learn user habits and act on that information- open apps before we need them, make recommendations on places we might like and guide us through our daily lives to make sure we?re where we need to be at the right time Siri is a personal assistant to the users, able to create contextual reminders and search through photos and videos in new ways Swiping right from the home screen also brings up a new screen that houses ?Siri Suggestions,? putting favorite contacts and apps right on your fingertips, along with nearby restaurant and location information and important news Deeper search capabilities can show results like sports scores, videos, and content from third-party apps, and you can even do simple conversions and calculations using the search tools on your iPhone or iPad Many of the built-in apps have been updated ? Notes includes new checklists and sketching features ? Maps now offers transit directions ? Mail allows for file attachments ? Apple Pay is being improved with the addition of store credit cards and loyalty cards ? Leading ?Passbook? to be renamed to ?Wallet? in iOS 9 San Francisco font, wireless CarPlay support An optional iCloud Drive app, built-in two-factor authentication and optional longer passwords for better security Performance improvements
Correct Answer: SQL has IsDate() function which is used to check passed value is date or not of specified format ,it returns 1(true) or 0(false) accordingly SELECT ISDATE('1/08/13') AS "MM/DD/YY"; It will return 0 because passed date is not in correct format