Searching for "file."

Q:

Every HTML file is a ___________ file.

 

A) Text B) Audio
C) Video D) Image
 
Answer & Explanation Answer: A) Text

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams

Q:

Write a c program to copy a data of file to other file.

Answer

#include<stdio.h>
int main(){
  FILE *p,*q;
  char file1[20],file2[20];
  char ch;
  printf("\nEnter the source file name to be copied:");
  gets(file1);
  p=fopen(file1,"r");
  if(p==NULL){
      printf("cannot open %s",file1);
      exit(0);
  }
  printf("\nEnter the destination file name:");
  gets(file2);
  q=fopen(file2,"w");
  if(q==NULL){
      printf("cannot open %s",file2);
      exit(0);
  }
  while((ch=getc(p))!=EOF)
      putc(ch,q);
  printf("\nCOMPLETED");
  fclose(p);
  fclose(q);
 return 0;
}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

Q:

You are a member of a team of developers creating several ASP.NET applications for XYZ. You want to create a reusable toolbar that will be used in each of the applications. The toolbar will be displayed at the top of each page viewed by the user.


The contents of the toolbar will vary depending on options each user selects when creating a profile.


You want to be able to add the toolbar to the ASP.NET toolbox for each of the developers on your team.What should you do?

A) Create a new Web Control Library project. Create the toolbar within a Web custom control. B) Add a new Web user control to your ASP.NET project. Create the toolbar within the Web user control.
C) Add a new Web Form to your ASP.NET project. Design the toolbar within the Web Form and save the Web Form with an .ascx extension. D) Add a new component class to your ASP.NET project. Design the toolbar within the designer of the component class.
 
Answer & Explanation Answer: A) Create a new Web Control Library project. Create the toolbar within a Web custom control.

Explanation:

Web custom controls are compiled code, which makes them easier to use but more difficult to create. You can add a Web custom control to the Toolbox and display it in a visual designer with full Properties window support and all the other design-time features of ASP.NET server controls. 

 

Incorrect Answers:

B: Web user controls are easy to make, but they can be less convenient to use in advanced scenarios such as this. Because Web user controls are compiled dynamically at run time they cannot be added to the Toolbox


C: A Web form would be inadequate.

 

D: The Component class Provides the base implementation for the IComponent interface and enables object-sharing between applications. It does not fit in this scenario.

Report Error

View Answer Report Error Discuss

Q:

You create an assembly by using Visual Studio .NET. The assembly is responsible for writing and reading order entry information to and from an XML data file. The assembly also writes and reads values to and from the Windows registry while it is being consumed.

 

The assembly will be distributed to client computers by using your company, XYZ, intranet. All client computers are configured to implement the default .NET security policy.

 

You need to implement security in the assembly. What should you do?

A) Implement declarative security and execute the permission demand to allow access to the file system and Windows registry. B) Implement declarative security and execute the minimum permission request to allow access to the file system and Windows registry.
C) Implement imperative security and execute the permission demand to allow access to the file system and Windows registry. D) Implement imperative security and execute the minimum permission request to allow access to the file system and Windows registry.
 
Answer & Explanation Answer: B) Implement declarative security and execute the minimum permission request to allow access to the file system and Windows registry.

Explanation:

You can use declarative code access security to request permissions for the entire assembly. SecurityAction flags that can be specified in an assembly-wide directive. When SecurityAction.RequestMinimum is specified, it makes a request to the common language runtime to be granted the requested permission. If the requested permission is not granted by the security policy, the assembly will not execute. A  Security Action.RequestOptional is similar, but the assembly will still run even if the requested permission is not granted. Specifying security Action. RequestRefuse requests that the assembly be denied the specified permission.

 

You must use the Assembly (assembly) directive when specifying these actions as follows: 

 

Option A:

There are only three Security actionAttributes targets for an assembly: RequestMinimumAssembly, RequestOptionalAssembly, and RequestRefuseAssembly. 

 

 Option C, D:

Imperative security does not work well to configure security for an entire assembly. In imperative security, permission to execute is demanded at run time.

Report Error

View Answer Report Error Discuss

Q:

Explain how to configure Trace switches in the application’s .config file.?

Answer

switches are configured using the .config file


<system.diagnostics>


<switches>


<add name="MyTraceSwitch" value="1" />


<add name="TraceSwitch2" value="1" />


</switches>


</system.diagnostics>


both are on.

Report Error

View answer Workspace Report Error Discuss

Subject: .NET