coderz.py

Keep Coding Keep Cheering!

Check for Prime number

A prime number is greater than one and can be divided by one or itself. In other words, prime numbers cannot be divided by anything other than themselves or 1. Prime numbers include 2, 3, 5, 7, 11, 13, 17, 19, 23, etc. Program code: Output: Note: also read about Diamond Pattern Using Numbers Follow Me […]

November 11, 2022 | C++ | No comments

Command Line Argument in Java

The java command-line argument is a parameter that is passed to the java program when it is run. The arguments passed from the console can be received and used as input in the Java program. As a result, it provides a convenient way to check the program’s behavior for various values. We can pass any number […]

May 9, 2022 | Java | No comments

The switch vs if-else

The switch and if-else both are selection statements, and they both let you select an alternative out of the given many alternatives by testing an expression. However, there are some differences in their operations. These are given below: switch if-else the switch can only test for equality if can evaluate a relational or logical expression […]

May 4, 2022 | Java | No comments

Format specifiers in C

Format Specifiers in C are used during input and output operations. They specify what kind of data is getting printed or accepted during program execution, that is to say,  using this concept compiler can understand what type of data is in a variable during taking input using the scanf() function and printing using printf() function. […]

February 15, 2022 | C | No comments

Comments in C

Comments in C are an explanation or description of the source code of the program. It helps a developer explain the logic of the code and improves program readability.  These comments are not executed by the compiler rather ignored by it. Type of comments:  There are two types of comments in the C language. Single-Line Comments […]

February 13, 2022 | C | No comments

Operators in C

Operators in C are symbols that are used to perform operations on operands(operands can be a constant, a variable, or a function on which operation is performed using the operators ). There can be many types of operations like arithmetic, logical, bitwise, etc. The following types of operators are supported in the C language − Arithmetic […]

February 10, 2022 | C | No comments

Data Types in C

Data types in C refer to how much memory it occupies in storage and how the bit pattern stored is interpreted. To thoroughly define a variable, one needs to mention not only its type but also its storage class. There are the following types of data types in C: Basic Types: They are arithmetic types […]

February 9, 2022 | C | No comments

Variables & Constants in C

Variables & Constants in C are formed by combining alphabets, numbers, and special symbols. Let us see what are ‘constants’ and ‘variables’ in C. Variables: An entity that may change during program execution is known as a variable. Variables are the names assigned to the memory locations. These locations can contain integer, real, or character […]

February 8, 2022 | C | No comments

Identifiers in C

Identifiers in C are the basic building block of a program. As the name suggests, they are used to identify user-defined objects. For instance, variables, functions, arrays, structures, unions, labels, etc. An identifier starts with a letter A to Z, a to z, or an underscore ‘_’ followed by zero or more letters, underscores, and […]

February 5, 2022 | C | No comments

Keywords in C

There is a close analogy between learning the English language and learning the C language. We start learning English by learning about alphabets, further create words and sentences by combining the words, Similarly, in C we learn about tokens which are the smallest individual unit in a program, they can either be a keyword or […]

February 4, 2022 | C | No comments

Advertisement