Skip to main content

Posts

Showing posts with the label mcq

Set Up Test Data for an Entire Test Class

Use test setup methods (methods that are annotated with @testSetup) to create test records once and then access them in every test method in the test class. Test setup methods can be time-saving when you need to create reference or prerequisite data for all test methods, or a common set of records that all test methods operate on. Test setup methods can reduce test execution times especially when you’re working with many records. Tes t setup methods enable you to create common test data easily and efficiently. By setting up records once for the class, you don’t need to re-create records for each test method. Also, because the rollback of records that are created during test setup happens at the end of the execution of the entire class, the number of records that are rolled back is reduced. As a result, system resources are used more efficiently compared to creating those records and having them rolled back for each test method @isTest private class CommonTestSetup { @...

C advanced interview questions and answers

   C advanced interview questions and answers  (1) What will be output if you will compile and execute the following c code? struct   marks {   int   p :3;   int   c :3;   int   m :2; }; void   main (){   struct   marks  s={2,-6,5};   printf( "%d %d %d" ,s. p ,s. c ,s. m );   } (a) 2 -6 5 (b) 2 -6 1 (c) 2 2 1 (d) Compiler error (e) None of these Answer:  (c) Explanation: Binary value of 2: 00000 010  (Select three two bit) Binary value of 6: 00000110 Binary value of -6: 11111001+1=11111 010 (Select last three bit) Binary value of 5: 000001 01  (Select last two bit) Complete memory representation: (2) What will be output if you will compile and execute the following c code? void   main (){    int  huge*p=( int  huge*)0XC0563331;    int  huge*q=( int  huge*)0xC2551341;   ...