How do you print a pyramid in c?
#include<stdio.h>
void main()
{
int i,j,k,n;
printf("Enter the value of n: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(k=1;k<=n-i;k++)
printf(" ");
for(j=1;j<=2*i-1;j++)
{
printf("*");
}
printf("\n");
}
}
What is parameter passing by value and by reference to a function?
Pass by value means the value of the actual argument is assigned to the formal argument of the function. This is how all functions work in all languages, but in some languages, such as Java, the implementation details may be hidden from us so it may not be obvious pass by value is occurring. When we say pass by reference what we really mean is that the value being passed is a memory address rather than an ordinary value. That is; the memory address is being passed by value. Memory addresses can only be stored in pointers, so for a function to accept an address its formal argument must be pointer of the same type. In languages that do not support pointers, such as Java, the pointers are still there we just don't have access to them.
In C++ we also have a native reference type. A reference is nothing more than an alias, an alternative name for an object of the same type. Unlike a pointer, a reference cannot change which object it refers to; it always refers to the same object it was assigned when it came into scope. Moreover, a reference can never be null. As a result, references are much easier to work with than pointers because we know that an object must exist if we have a reference. With pointers, we must test the pointer is non-null before we can determine if it refers to an actual object. In addition, a pointer has storage and identity whereas a reference does not. If we attempt to take the address of a reference, we take the address of the object being referred to. If we take the address of a pointer we get the pointer's own address (as opposed to the address stored at that address).
Although C++ supports a native reference type, behind the scenes the compiler uses pointers to implement them. So references are really just passed by value the same way pointers are passed by value. Regardless, if a function accepts either a pointer or a reference, it is said to be using the pass by reference semantic, otherwise it is using the (default) pass by value semantic.
Write a program to get table of a number?
#include "stdio.h" #include "conio.h" #define TABLE_UP_TO_20 20 void table_of_a_number(int number); int main() { int i = 0x00; printf("Enter a positive number in decimal whose table has to be generated"); scanf("%d",&i); table_of_a_number(i); return 0; } void table_of_a_number(int number) { int count = 0x00; for(count = 0x01;count <=TABLE_UP_TO_20 ;count++) { /* THis will print the table*/ printf(" %d * %d = %d\n", number,count, (number*count)); }
What class does the ASP.NET Web Form class inherit from by default?
The ASP.NET Web Form is not a class, it's an HTML document; a plain-text file.
Global.asax is a file that contains Application layer events like: Application Start, Application end, Application error ...
You can use those events to make some actions like filling data in cache, clear cache, send error email to system admin when errors occur ...
What is needed to configure a new extension for use in ASPNET For example what if I wanted my system to serve ASPX files with a .jsp extension? In: http://wiki.answers.com/Q/FAQ/6486, http://wiki.answers.com/Q/FAQ/8462[Edit categories]
Improve
What is the difference between ASP.net and ASP?
The main difference between ASP and ASP.Net is that ASP is interpreted whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses.NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language. Below some other difference are given.
1. Classic ASP uses a technology called ADO to connect and work with databases. ASP.NET uses the ADO.NET technology.
2. ASP has Mixed HTML and coding logic where in asp.net html and coding part are separated by code behind files.
3. ASP.NET purely object oriented whereas ASP is partially object oriented.
4. For ASP No in-built support for XML whereas in ASP.NET full XML Support for easy data exchange.
I think above details help you a lot. I hosted my website at Asp.net hosting of Mywindowshosting.com.
How many types of authorization and authentication provided by ASP.net?
Authentication
!) form based Authentication
2) Windows " "
3) Passport "
What is the latest version of aspnet?
The Latest stable version of ASP.net is 3.5
Microsoft has although released the beta version(RC) of ASP.NET 4.0 along with MS Visual Studio 2010 this february. And the final stable release of ASP.NET 4.0 is expected soon by the April 2010.
Thanks & Regards,
Shoaib R Khan - SRK
Update: ASP.NET 4.0 and Microsoft Visual Studio 2010, have been released, making them the latest stable versions of ASP.NET
What is the full form of Asmx in asp.net?
ASMX - Active Server Method Extended
ASPX - Active Server Page Extended
ASCX - Active Server Control Extended
Try adding the tilde ~ at the begining of the path. This starts the path at the website root.
"~\images\Image,jpg"
How do you get path of a DLL from inside the DLL itself?
http://www.codeproject.com/KB/DLL/DLLModuleFileName.aspx
What is the difference between ASP.net and JAVA?
ASP.NET and Java are two frameworks/languages for web development. ASP.NET stands for Active Server Pages and is applied to Microsoft's .NET framework.
Difference between Cookies and Session in AspNet?
* The main difference between cookies and sessionsis that cookies are stored in the user's browser, and sessions are not. This difference determines what each is best used for.
* A cookie can keep information in the user's browser until deleted. If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit. You can store almost anything in a browser cookie. * The trouble is that a user can block cookies or delete them at any time. If, for example, your websites shopping cart utilized cookies, and a person had their browser set to block them, then they could not shop at your website. * Sessions are not reliant on the user allowing a cookie. They work instead like a token allowing access and passing information while the user has their browser open. The problem with sessions is that when you close your browser you also lose the session. So, if you had a site requiring a login, this couldn't be saved as a session like it could as a cookie, and the user would be forced to re-login every time they visit.
Can you serve ASP.NET with Apache?
Yes this can be done. For complete instructions refer to related links.
Is asp.net platform independent or not?
ASP.NET is not a language in itself rather a web technology that uses .NET programming languages to build dynamic web sites and web applications. I suppose the question is if .NET is platform-independent?
My answer would be 'currently, no'. .NET is slowly catching up but it is still way to go before it become platform independent. The framework works only on WINDOWS at present and not on other OS. I would say it is language independent. That is to say any language targeting CLR can be used to write code for applications.
A new project called MONO is in works which will allow the .NET framework to be installed on LINUX but there's no official support from MS on this as of now.