Found 206 Articles for Programming Languages

How to find the Reverse of a given number using Recursion in Golang?

Aman Sharma
Updated on 11-Jan-2023 17:10:40

721 Views

In this tutorial, we are going to learn how we can find the reverse of the given number in the Golang programming language. The recursive function is more suitable if we want to modify the function that is not possible with a For loop. In this article, we are going to achieve this by using recursion. Explanation Iteration 1: Number = 54678 Reverse of number = 0 Reverse of number = Reverse of number * 10 + Number % 10 = 0 + 54678 % 10 = 0 + 8 = ... Read More

How to find the LCM of two given numbers using Recursion in Golang?

Aman Sharma
Updated on 11-Jan-2023 17:02:33

735 Views

In this tutorial, we are going to find the Least common multiple of two numbers in Golang using recursion. To find the LCM recursively we are going to use the relation of LCM with the Greatest common divisible i.e GCD of both the numbers. LCM stands for least common multiple is the smallest number divisible by two numbers. For example, Suppose the two numbers are 10 and 4. The smallest number that is divisible by both numbers evenly is 20. Finding LCM Using the Relation between LCM and GCD In this example, we are going to find the LCM using ... Read More

How to check whether a character is in the Alphabet or not in Golang?

Aman Sharma
Updated on 11-Jan-2023 16:54:04

1K+ Views

In this tutorial, we will learn how to check whether the character is an alphabet or not. This tutorial includes two ways to achieve this − First, using the built-in function isLetter() present in the fmt library will reduce the line of codes. Another way is to use the concept of ASCII values as every character has a unique ASCII value using which we can find out whether the current character is an alphabet or not. The ranges of uppercase and lowercase alphabets are as follows − uppercase alphabets – 65 to 90 lowercase alphabets – 97 to 122 If ... Read More

What are the differences between BigDL and Caffe?

Bhanu Priya
Updated on 23-Mar-2022 10:30:15

166 Views

Let us understand the concepts of BigDL and Caffe before learning the differences between them.BigDLIt is a distributed deep learning framework for Apache Spark, launched by Jason Dai in the year 2016 at Intel. By using BigDL, users write deep learning applications as standard Spark programs that can directly run on top of existing Spark or Hadoop clusters.FeaturesThe features of BigDL are as follows −Rich deep learning supportEfficiently scale-outExtremely high performanceprovides plenty of deep learning modulesLayersOptimizationAdvantagesThe advantages of BigDL are as follows −SpeedEase of useDynamic natureMultilingualAdvanced analyticsDemand for spark developers.DisadvantagesThe disadvantages of BigDL are as follows −No automatic optimization processFile ... Read More

Differentiate between Component and Object.

Bhanu Priya
Updated on 21-Mar-2022 11:12:31

2K+ Views

Let us learn the concept of object and component.ObjectIt is defined as a concept, thing or abstract with meaning.FeaturesThe features associated with object are as follows −StateOperationAttributesRepresent something realProvides an abstractionSelf-containedClearly defined.ComponentIt can be defined as a collection of objects which provides a set of services to other systems.For example − components include code which provides graphic facilities, network services, and a search set of tables in the database.A component is a self-contained entity which provides functionality to its environment and also imports functionality from its environment using well defined and open interfaces.The components that differ from objects are as ... Read More

Convert the following LEX program into Lexical Analyzer.AUXILIARY DEFINITIONS − − −TRANSLATION RULES a{ } abb{ } a*b+

Ginni
Updated on 08-Nov-2021 13:17:06

2K+ Views

SolutionConvert the pattern into NFA’sMake a Combined NFAConvert NFA to DFAA = ε − closure (0) = {0, 1, 3, 7}The transition on symbols a, b from state AFor State Aε − closure (Ta)                              ε − closure (Tb)= ε − closure ({2, 4, 7})                  = ε − closure ({8})= {2, 4, 7} = B                                = {8} = CFor State Bε − closure (7) ... Read More

What is syntax-directed translation schemes in compiler design?

Ginni
Updated on 08-Nov-2021 11:25:31

6K+ Views

It is a kind of notation in which each production of Context-Free Grammar is related with a set of semantic rules or actions, and each grammar symbol is related to a set of Attributes. Thus, the grammar and the group of semantic Actions combine to make syntax-directed definitions.The translation may be the generation of intermediate code, object code, or adding the information in symbol table about constructs type. The modern compiler uses the syntax-directed translation that makes the user’s life easy by hiding many implementation details and free the user from having to specify explicitly the order in which semantic ... Read More

What is Implementation of Block Structured Language in compiler design?

Ginni
Updated on 08-Nov-2021 11:31:20

10K+ Views

A block is a statement containing its own local data declaration. The concept of a block is originated with ALGOL. The block-structured language permits an array with adjustable length. The main feature of blocks is their bracketing structure (begin and end used in ALGOL) in which they can define their data.Activation Record for Block Structured LanguagesBlock structured language like ALGOL, and PL/I permit adjustable arrays, i.e., of varying length. Therefore, we cannot store irregular size arrays in between activation records. It can allocate the flexible or variable arrays at one corner of the activation record or above the fixed-size data. ... Read More

What is Block Structure?

Ginni
Updated on 08-Nov-2021 11:21:51

8K+ Views

A block is a statement containing its own local data declaration. The concept of a block is originated with ALGOL. The block-structured language permits an array with adjustable length. The main feature of blocks is their bracketing structure (begin and end used in ALGOL) in which they can define their data. In 'C' language, the syntax of the block is −{    declaration statements; }where the braces limit the block. The characteristic of a block is its nesting structure. Delimiters mark the starting and end of the block. In 'C' language, the braces { } act as delimiters, while ALGOL ... Read More

What is Stack Allocation of Procedure Calls?

Ginni
Updated on 08-Nov-2021 11:10:08

2K+ Views

In stack allocation, it can analyze how the memory is allocated at runtime when a procedure is called & when the value from the procedure is returned.Passing Parameter to Procedure (param x)− When actual parameter x is passed to the procedure, it will be pushed into the stack, i.e., push (x).∴ param(x) refers to push (x) which refers to decrementing of the top pointer from N + 1 to N and x will be pushed onto the stack.∴ The following statements will be executed.top = top – 1*top = x or 0[top] = xHere 0[top] means 0 offsets from the ... Read More

Previous 1 ... 5 6 7 8 9 ... 21 Next
Advertisements