List some compiler directives?

1 Answer

Answer :

#if

#else

#elif

#endif

#define

#undef

#warning

#error

#line

#region

#endregion

Related questions

Description : How do you generate documentation from the C# file commented properly with a command-line compiler? 

Last Answer : Compile it with the /doc switch. 

Description : How do you generate documentation from the C# file commented properly with a command-line compiler?

Last Answer : Compile it with the /doc switch.

Description : List out any four assembler directives and state their functions.

Last Answer : ORG directive: It is used to specify starting address of the Program. A 16bit address follows ORG ORG 0020H will start program from 0020H memory location.  END directive: It indicates end of the ... that when the label appears in the program, itp constant value will be substituted for the label.

Description : List some custom attribute scopes and possible targets. 

Last Answer : Assembly – assembly Class – type Delegate - type, return

Description : List some of the advantages of C#?

Last Answer : Below are the advantages of C# – 1. Easy to learn 2. Object-oriented 3. Component-oriented 4. Part of .NET framework

Description : Briefly describe what members are, and list the four types of members.

Last Answer : Members are the parts of a class or a structure that hold data or implement functionality. The primary member types are fields, properties, methods, and events.

Description : List the differences in C# 2.0. 

Last Answer : • Generics • Iterators • Partial class definitions • Nullable Types • Anonymous methods • :: operator • Static classes static class members • Extern keyword • Accessor accessibility • Covariance and Contravariance • Fixed size buffers • Fixed assemblies • #pragma warning

Description : List out two different types of errors in C#?

Last Answer : Below are the types of errors in C# – 1. Compile Time Error 2. Run Time Error

Description : List out the differences between Array and ArrayList in C#?

Last Answer : Array stores the values or elements of the same data type but ArrayList stores values of different data types. Arrays will use the fixed length but ArrayList does not use fixed length like an array.

Description : What would a real Robocop's "prime directives" be?

Last Answer : 1. Identify and pursue all vehicles with air fresheners hanging from the mirror. 2. Don’t get caught slipping’ 3. Eat the rich

Description : What are your personal health directives?

Last Answer : They’re “personal” for a reason!

Description : What are your personal directives in case you can't communitcate and are sick?

Last Answer : My day MUST begin with an ice cold glass of Coke!!! Make sure I’m comfortable & NOT in pain. IF I can come out better on the other side of any procedure, fix it. IF NOT…let me go!!!

Description : what organization issues the directives concerning the dissemination of information regarding -General Knowledge

Last Answer : Department of defense issues the directives concerning the dissemination of information regarding intelligence sources, methods, or activities.

Description : What are the 31 directives of the Prime Minister in Corona situation ?

Last Answer : Prime Minister Sheikh Hasina has given 31 point instructions to deal with the crisis caused by coronavirus. There are guidelines for people of all walks of life including doctors , nurses and government ... spread on digital platforms. Do not listen to rumors and do not be disturbed by rumors.

Description : Advance care directives?

Last Answer : DefinitionAdvance care directives are specific instructions, prepared in advance, that are intended to direct a person's medical care if he or she becomes unable to do so in the future. ... health care)".Federal law requires hospitals, nursing homes, and other institutions that receive Medicar

Description : Healthcare Planning with Advance Medical Directives?

Last Answer : Many people think that planning for end of life and making othercritical healthcare decisions is for senior citizens. The truth isthat anyone could end up in a situation where they ... treatments that you prefer and what life saving measuresyour doctors and hospital staff are permitted t

Description : What can the President do if a State fails to comply with the Directives of the Central Government? (1) He can dissolve State Legislature and order fresh elections (2) He can declare the break-down ... (3) He can send paramilitary forces to the State to secure compliance (4) Any of the above

Last Answer : (2) He can declare the break-down aconstitutional machinery in the State and assume responsibility for the governance of the State Explanation: If the President is satisfied, on the basis of the ... six months to a maximum period of three years with repeated parliamentary approval every six months.

Description : The growth of judicial power over the last one hundred years in liberal democracies have taken place because - (1) The constitutions have given the judiciary more powers (2) Acceptance of the theory of separation of powers (3) The U. N. Directives (4) Protect Human Rights

Last Answer : (4) Protect Human Rights Explanation: The growth of Judicial Power over the last one hundred years in liberal democracies has taken place to protect Human rights.

Description : What are the inline and the precompiler directives

Last Answer : The inline and precompiler directives detect the values directly

Description : In connection with the element of professional development, a CPA firm's system of quality control should ordinarily provide that all personnel a. Possess judgment, motivation, and adequate ... review directives. d. Have the knowledge required to enable them to fulfill responsibilities assigned.

Last Answer : Have the knowledge required to enable them to fulfill responsibilities assigned.

Description : Experience has shown that certain conditions in an organization are symptoms of possible management fraud. Which of the following conditions would not be considered an indicator of possible fraud? ... their profit center's scope d. Managers are not complying with corporate directives and procedures

Last Answer : Managers are subject to formal performance reviews on a regular basis.

Description : Planning in India derives its objectives from – (i) Preamble (ii) Fundamental duties (iii) Fundamental rights (iv) Directives principles of state policy

Last Answer : (iv) Directives principles of state policy

Description : Which of the following problems is most likely to occur in a matrix structure? (a) Decreased employee motivation ; (b) Employees receiving conflicting directives (c) Decreased response to environmental change ; (d) Decreased coordination

Last Answer : (b) Employees receiving conflicting directives

Description : What is the output of the following program ? (Assume that the appropriate pre-processor directives are included and there is no syntax error) main() { char S[ ] = "ABCDEFGH"; printf ("%C",* (& ... Base address of S is 1000 */ } (A) ABCDEFGH1000 (B) CDEFGH1000 (C) DDEFGHH1000 (D) DEFGH1000

Last Answer : (D) DEFGH1000

Description : Explain the following assembler directives. 1) DB 2) DUP 3) EQU 4) ENDs.

Last Answer : 1) DB (Define Byte or Data Byte): This is used to define a byte type variable. The range of values : 0 - 255 for unsigned numbers -128 to 127 for signed numbers This can be used ... the end of the segment The directives SEGMENT, ENDS are always enclosed in data, code, stack and extra segments.

Description : Explain the use of following assembler directives. (i) EQU (ii) ORG

Last Answer : (i) EQU: Equate It is used to define constant without occupying a memory location. Syntax: Label EQU Numeric value By means of this directive, a numeric value is replaced by a symbol. For e.g. ... decimal. If the number is notfollowed by H, it is decimal and the assembler will convert it to hex.

Description : Describe Break mode and some of the available methods for navigating in Break mode.

Last Answer : Break mode allows you to observe program execution on a line-by-line basis. You can navigate program execution in Break mode by using Step Into, Step Over, Step Out, Run To Cursor, and Set Next Statement.

Description : Write some code to declare and use properties.

Last Answer : // instance public string InstancePr { get { return a; } set { a = value; } } //read-only static public static int ClassPr { get { return b; } }

Description : Write some code to implement an indexer.

Last Answer : using System; namespace Console1 { class Class1 { static void Main(string[] args) { MyIndexableClass m = new MyIndexableClass(); Console.WriteLine(m[0]); Console.WriteLine(m[1]); Console.WriteLine(m[2]); Console. ... get { return myData[i]; } set { myData[i] = value; } } } }

Description : Write some code that uses an ArrayList.

Last Answer : ArrayList list = new ArrayList(); list.Add("Hello"); list.Add("World");

Description : Write some code to implement a jagged array. 

Last Answer : // Declare the array of two elements: int[][] myArray = new int[2][]; // Initialize the elements: myArray[0] = new int[5] {1,3,5,7,9}; myArray[1] = new int[4] {2,4,6,8};

Description : Write some code to implement a multidimensional array.

Last Answer : int[,] b = {{0, 1}, {2, 3}, {4, 5}, {6, 7}, {8, 9}}; 

Description : Write some code for a custom collection class.

Last Answer : using System; using System.Collections; public class Items : IEnumerable { private string[] contents; public Items(string[] contents) { this.contents = contents; } public IEnumerator GetEnumerator() { ... (string item in items) { Console.WriteLine(item); } Console.ReadLine(); } }

Description : Write some code that declares an array on ints, assigns the values: 0,1,2,5,7,8,11 to that array and use a foreach to do something with those values.

Last Answer : int x = 0, y = 0; int[] arr = new int [] {0,1,2}; foreach (int i in arr) { if (i%2 == 0) x++; else y++; }

Description : Write some code for do… while.

Last Answer : int x; int y = 0; do { x = y++; Console.WriteLine(x); } while(y < 5);

Description : Write some code for a while loop. 

Last Answer : int n = 1; while (n < 6) { Console.WriteLine("Current value of n is {0}", n); n++; }

Description : Write some code for a for loop 

Last Answer : for (int i = 1; i <= 5; i++) Console.WriteLine(i);

Description : Write some if… else if… code.

Last Answer : int n=4; if (n==1)  Console.WriteLine("n=1"); else if (n==2) Console.WriteLine("n=2"); else if (n==3) Console.WriteLine("n=3"); else Console.WriteLine("n>3");

Description : Write some try…catch…finally code.

Last Answer : // try-catch-finally using System; public class TCFClass { public static void Main () { try { throw new NullReferenceException(); } catch(NullReferenceException e) { Console.WriteLine("{0} exception 1 ... ("exception 2."); } finally { Console.WriteLine("finally block."); } } }

Description : Write some code to overload an operator. 

Last Answer : class TempleCompare { public int templeCompareID; public int templeValue; public static bool operator == (TempleCompare x, TempleCompare y) { return (x.templeValue == y.templeValue); } ... templeValue); } public override int GetHashCode() { return templeCompareID; } }

Description : Write some code to box and unbox a value type. 

Last Answer : // Boxing int i = 4; object o = i; // Unboxing i = (int) o;

Description : Write some code to use a delegate. 

Last Answer : Member function with a parameter using System; namespace Console1 { class Class1 { delegate void myDelegate(int parameter1); static void Main(string[] args) { MyClass myInstance = new ... void AMethod(int param1) { Console.WriteLine(param1); } } }

Description : Write some code using interfaces, virtual methods, and an abstract class.

Last Answer : using System; public interface Iexample1 { int MyMethod1(); } public interface Iexample2 { int MyMethod2(); } public abstract class ABSExample : Iexample1, Iexample2 { public ABSExample( ... override void VIRTMethod2() { System.Console.WriteLine("VIRTMethod2 has been overridden"); } }

Description : Can you prevent your class from being inherited and becoming a base class for some other classes?

Last Answer : Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.

Description : What si the difference between interface and abstractclass Select Answer:  1. interface contain only methods  2. we can't declare a variable for interface  3. interface contain only events  4. None  5. All

Last Answer : Ans : 2 The only Difference between Interface and Abstract class is we can declare a variable in abstract class but we can't declare in variable interface

Description : What is the lifespan for items stored in ViewState? Select Answer:  1. Item stored in ViewState exist for the life of the current page  2. Item stored in ViewState exist for the life ... of the current Applicaiton  4. Item stored in ViewState exist for the life of the current configuration

Last Answer : 1. Item stored in ViewState exist for the life of the current page AS any web application works on request and response basis ,so on every post backs, The data in control gets lost. To retain page ... control with data. The life cycle of the view state exist for life of current running page only. 

Description : Which one of the following tools is used to view the metadata information contained in a .NET assembly? Select Answer:  1. al.exe  2. ilasm.exe  3. vbx.exe  4. csc.exe  5. ildasm.exe

Last Answer :  5. ildasm.exe

Description : How would you ensure that all relevant registry entries were removed in the event that installation of your application failed?

Last Answer : You can ensure that registry entries are removed, as well as perform any other “clean-up” tasks, by creating an Installer class and writing the appropriate code in the Rollback event handler. Then create a new Custom Action and set the InstallerClass, and EntryPoint properties to appropriate values.

Description : Describe a general strategy for creating a setup project that terminates installation if a specific file is not already installed on the target machine.

Last Answer : First, create a file search to search the file system for the specific file. Then create a launch condition to evaluate the results of the search. You can connect the launch condition to ... in the search's Property property in the expression specified by the launch condition's Condition property. 

Description : What is the purpose of a bootstrapper application? When do you not need to create one?

Last Answer : A bootstrapper application automatically detects if Windows Installer is installed on the target machine. If Windows Installer is not present, it installs Windows Installer before proceeding with the rest ... Installer 1.5 already installed) or have had Microsoft Installer 1.5 installed previously.