Hello Sir, Thanks for the Solution but, can you pls. Explain
the coding for the Static Function & static variable from
the below coding....waiting for Ans.


class fact

{

public static void Main()

{

fact f=new fact();

int x=1; //Declaration of x as 1

int k=Convert.ToInt32(Console.ReadLine());

for(int i=1;i<=k;i++)

{

x= x *i;

}

System.Console.WriteLine(x);

}
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Sharp Code Interview Questions

how do i copy textbox contents of 1 form to another form

4 Answers   Wipro,


Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

2 Answers   Mind Tree,


Coding for using Nullable Types in C#?

1 Answers  


how does the below eqation proceed to be solved: x*=y+z options: x=x*y+z or x=x*(y+z)

1 Answers  


Write a program to convert postfix expression to infix expression.

0 Answers   Mind Tree,






I am developing a web application using google map api.I want to update the map inside the div control within update panel. I got other controls updated but map doesn't get updated.I do not not want to update map whenever unnecessary controls are fired at server side.How could it be achieved?

0 Answers  


How to Create a Treeview Menu in ASP.NET with C#?

1 Answers  


program for string reverse(eg:- i am boy -> boy am i)

8 Answers   Black Pepper, Infosys, Mind Tree,


How to find No of classes,Packages,No of Methods per Classes and Depth of Inheritance for selecting source code in windows form application using c# .net? (Source code is input Program. It may be Java or .net) Please help me..) Thanks..)

0 Answers  


Create a class called Accounts which has data members like ACCOUNT no, Customer name, Account type, Transaction type (d/w), amount, balance D->Deposit W->Withdrawal If transaction type is deposit call the credit(int amount) and update balance in this method. If transaction type is withdraw call debit(int amt) and update balance. Pass the other information like Account no,name,Account Type through constructor. Call the show data method to display the values.

1 Answers   Cognizant,


program to check if a number is "perfect number".

1 Answers   Mind Tree, SoftSol,


Code for Searching for Multiple Matches with the MatchCollection Class?

0 Answers   TCS,


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)