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

Write a program to input an integer and - display the reverse - display the sum of each digit - should include logic that considers the input number as any number of digits long

2 Answers   Mind Tree,


Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.

1 Answers   Infosys, Mind Tree,


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,


Give the code for Handling Mouse Events?

0 Answers  


how can i split sting in textbox in windows application using c# .net

2 Answers  


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?

0 Answers   Eastcom Systems,


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); } }

0 Answers  


c# code to Count number of 1's in a given range of integer (0 to n)

0 Answers  


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

4 Answers   Wipro,


Event Handling in C# Triggering a Button

1 Answers  


Write a program to convert postfix expression to infix expression.

0 Answers   Mind Tree,


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

1 Answers  


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)