Pattern Print in All Programming Languages


what is code in all programming language

Code is a set of instructions that tells a computer how to perform a task. It is written in a programming language and is the fundamental building block of any software or application.

what is function in all programming language

A function is a block of code that performs a specific task. It is commonly used in programming languages to perform a specific calculation or action. It is a reusable block of code that can be called upon whenever needed. It is also known as a subroutine or procedure.

what is data type in all programming language

A data type is a classification of the type of data, such as numbers, strings, images, and audio clips, that can be stored and manipulated in a computer program. Data types determine the type of operations that can be performed on the data, as well as what type of data can be stored in a particular location in memory.

what is variable in all programming language

A variable is a named storage location in a computer program that holds a value that can be changed during the execution of the program. A variable can have different values at different points in time and can be used to store data such as numbers, strings, objects, and even other variables.

what is class in all programming language

A class is a type of user-defined data structure that can be used to store and manipulate data in a program. Classes are typically used to group related data and functions together, and are the foundation of object-oriented programming. They are also used to create custom data types and to represent real-world objects in a program.

what is object in all programming language

An object is an instance of a class. It is a self-contained entity that contains both data and behavior. Objects are used to model real-world objects and processes, and can be manipulated in a program. They are the foundation of object-oriented programming and are used to create more complex and powerful applications.

what is inheritance in all programming language

Inheritance is a concept in object-oriented programming (OOP) where a class can derive or inherit properties and methods from a parent or superclass. This allows the child class to inherit attributes and behaviors from the parent class, which can be reused and customized, allowing for code reuse and efficient development.

what is polymorphism in all programming language

Polymorphism is a concept in object-oriented programming (OOP) where an object can take on multiple forms. This allows for objects of different types to be handled in the same manner. Polymorphism allows for code reuse, since objects of different types can be treated the same way, and it also allows for code to be more flexible and extensible. Polymorphism can be achieved through inheritance, interfaces, and method overriding.

what is abstraction in all programming language

Abstraction is a concept in object-oriented programming (OOP) where a class is defined in terms of its properties, methods, and behaviors, without providing any implementation details. This allows for code to be more flexible and extensible, since the implementations can be changed without affecting the rest of the code. Abstraction is often used to reduce complexity and improve readability of code.

what is encapsulation in all programming language

Encapsulation is a concept in object-oriented programming (OOP) where the data and code related to an object are kept together in a single unit, or class. This helps to keep the data and code safe from outside modification and allows for better code organization and readability. Encapsulation also allows for code reuse, since the same code can be used for different objects.

what is message passing in all programming language

Message passing is a technique used in many programming languages, such as C++, Java, and Python, to allow objects to communicate with one another. It works by allowing one object to send a message to another object, which can then respond with a relevant action. This allows objects to interact with each other and work together to create complex applications.

what is array in all programming language

An array is a data structure that stores a collection of items in a single list. Arrays are used in almost all programming languages to store collections of data. It is often used to store similar types of data, such as a list of numbers or strings. Arrays allow programmers to quickly access, loop through, and manipulate multiple values.


write a code in c for print 

*
**
***
****
*****

#include <stdio.h>

int main()
{
    int i, j;
    for(i=1; i<=5; i++)
    {
        for(j=1; j<=i; j++)
        {
            printf("*");
        }
        printf("\n");
    }
    return 0;
}

write a code in c++ for print 
*
**
***
****
*****

#include <iostream>

using namespace std;

int main()
{
    int i, j;
    for(i=1; i<=5; i++)
    {
        for(j=1; j<=i; j++)
        {
            cout << "*";
        }
        cout << "\n";
    }
    return 0;
}


write a code in html for print 

*
**
***
****
*****

<html>
<body>

<h1>Stars</h1>

<p>
    *<br>
    **<br>
    ***<br>
    ****<br>
    *****<br>
</p>

</body>
</html>


write a code in java for print 

*
**
***
****
*****

public class Main {
    public static void main(String[] args) {
        for (int i = 1; i <= 5; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}


write a code in .net for print 

*
**
***
****
*****

using System;

public class Program
{
    public static void Main()
    {
        for (int i = 1; i <= 5; i++)
        {
            for (int j = 1; j <= i; j++)
            {
                Console.Write("*");
            }
            Console.WriteLine();
        }
    }
}

write a code in php for print 

*
**
***
****
*****

<?php

for($i=1;$i<=5;$i++)
{
    for($j=1;$j<=$i;$j++)
    {
        echo '*';
    }
    echo "\n";
}

?>


write a code in javascript for print 

*
**
***
****
*****

for (let i = 1; i <= 5; i++) {
    let stars = '';
    for (let j = 1; j <= i; j++) {
        stars += '*';
    }
    console.log(stars);
}


write a code in c# for print 

*
**
***
****
*****

using System;

public class Program
{
    public static void Main()
    {
        for (int i = 1; i <= 5; i++)
        {
            for (int j = 1; j <= i; j++)
            {
                Console.Write("*");
            }
            Console.WriteLine();
        }
    }
}

write a code in python for print 

*
**
***
****
*****

for i in range(1,6):
    for j in range(1,i+1):
        print('*', end='')
    print()

write a code in pascle for print 

*
**
***
****
*****

program printStars; 

var i, j: Integer; 

begin 
    for i:=1 to 5 do 
    begin 
        for j:=1 to i do 
            Write('*'); 
        Writeln; 
    end; 
end.

write a code in asp for print 

*
**
***
****
*****

<%
for i = 1 to 5
    for j = 1 to i
        Response.Write("*")
    next
    Response.Write("<br>")
next
%>

write a code in jsp for print 

*
**
***
****
*****

<%
for (int i=1; i<=5; i++) {
    for (int j=1; j<=i; j++) {
        out.print("*");
    }
    out.println("<br>");
}
%>

NOTE : आप Computer Science से सम्बंधित content हमे इस Mail Id पर भेजे जो हम आपके द्वारा भेजे हुए content को वेबसाइट पर आपकी photo सहित प्रकाशित करेंगे। official.cswithgk@gmail.com
Previous Post Next Post

Contact Form