Tuesday, December 6, 2022

As a Front-End Engineer: 8 Useful Npm Coding Techniques That You Should Use


---------------------------------------------------------------------------------------------------------------------------
Prepared By : Uday Shah 
Contact No : 9427439007
E-Mail : udayshah80@gmail.com


As a Front-End Engineer: 8 Useful Npm Coding Techniques That You Should Use

1.# Open a package’s documentation page

My friends, it would have saved me a lot of time if I had known this trick earlier.

In the past, when I wanted to query the usage documentation of lodash, I always searched for its address through google.

In fact, npm can help you achieve this goal quickly. You only need to run npm docs xxx to quickly open xxx's documents

npm docs [package-name] // npm docs lodash

2.# Open a package’s GitHub repo

As a programmer, I guess you also like github, which is a treasure base for programmers.

Sometimes I want to know the source code of a package, can I only search for the package name on github?

The answer is no, npm can help you quickly open a package's GitHub repo

npm repo [package-name] // npm repo lodash

3.# Check packages for outdated dependencies

Run the npm outdated command in your project and it will check all packages for the current version, the required version and the latest version.

 

npm outdated

4.# View all historical versions of a package

Do you know how to view all historical versions of a package?

Yes, we can do this through npm’s online site.

That’s like this link below…

https://www.npmjs.com/package/lodash?activeTab=versions

 

Is there another way? It’s amazing, all you need is this one-line command.

npm v [package-name] versions // npm v lodash versions

 

5.# Find risky packages in your project

from npm The audit command submits a description of the dependencies configured in your project to your default registry and asks for a report of known vulnerabilities. If any vulnerabilities are found, then the impact and appropriate remediation will be calculated. If the fix argument is provided, then remediations will be applied to the package tree.

npm audit

 

6.# View details of a package

Well! Maybe this command is not very useful, but you can use it to learn a lot about a package, such as its author, contact information, etc.

npm v [package-name] // npm v lodash

 

7.# npm xmas

I never thought npm would be so interesting, haha!

When you run npm xmas, you will see a Christmas tree.

npm xmas

 

8.# npm visnup

My friends, if you know the reason, please tell me. Why does a person appear.

npm visnup

 

 

Finally

Thanks for reading.

 


Monday, December 5, 2022

Noble University IMCA and BCA C Language Question Bank

 
----------------------------------------------------------------------------------------------------------------------------

Prepared By : Uday Shah (HOD - IT)

Mobile No : 7600044051

E-Mail : rupareleducation@gmail.com


Question Bank Unit 1

1 – Marks

1. Give full form : ANSI

Ans : American National Standard Institute

2. Give definition: Algorithm.

Ans : algorithm is a procedure or Step by Step instruction for solving program.

3. What is a dry run?

Ans :  A dry run is the process of a programmer manually working through their code to trace the value of variables

4. What is a flowchart?

Ans : A flowchart is a type of diagram that represents a workflow or process.

5. Give the difference between ++m and m++ notation.

Ans : ++m is Pre Increment and m++ is Post Increment

6. What is the range of character datatype in the C programming language?

Ans : -128 to 127

7. Explain the scanf () function.

Ans : Scanf function is used to input data from keyboard.

8. How many bits are occupied by the character datatype?

Ans : 1 Byte

9. What is the output?

#include<stdio.h>

#include<coni.h>

void main()

{

int k=65;

printf(“%c %d”, k, k );

}

Ans : A65

10.What is a header file consist of?

Ans : Library Function

11.What is the return data type of scanf()?

Ans : int

12.Why should we use i++ rather than i=i+1?

Ans : i++ execute fast in compare to I = I + 1

13.What is the difference between local and global variable declaration in C?

Ans : Scope of the Variable, Local variable scope limited while global variable scope is entire program.

14.What is Enumeration?

Ans : Enum is User Define Data Type

15.C Language consists of ______ number of keywords.

Ans : 32

16.C is middle–level language. [True/False]

Ans : True

17.C programming is _____ (top-down/bottom-up) programming.

Ans : top to down

18.Operators in C language are classified into ________

Ans : 6 Type

19.Types of comment available in C language is/are _________

Ans : Two 1. Single Line Comment and 2. Multiline Comment

20.C supports as many as _______relational operators.

Ans : 6 Types


Question Bank Unit 2

 1 – Marks


1. Which loop executes at least one?

Ans : do wile loop

2. List out iterative control statements in the c programming language.

Ans : For, While and Do while

3. ____________ statement will terminate the current execution of a loop.

Ans : break

4. Which two loops are known as entry control loops?

Ans : For and While

5. What is the “break” keyword?

Ans : it is use to terminate the current execution.

6. When if statements are nested, the last else gets associated with the nearest if without an else. (T/F)

Ans : False          

7. The _______ operator is true only when both the operands are true.

Ans : And

8. Multiway selection can be accomplished using an else if statement or the __________ statement.

Ans : Switch

9. Each expression in the else if must test the same variable. (T/F)

Ans : True

10.The ______ statement when executed in a switch statement causes immediate exit from the structure.

Ans : Break

11.Find errors, if any, in each of the following segments:

if (x + y = z && y > 0)

printf(“ “);

Ans : Error : if( x+y == z && y > 0)

12.In a pretest loop, if the body is executed n times, the test expression is executed n + 1 times. (T/F)

Ans : True

13.The number of times a control variable is updated always equals the number of loop iterations. (T/F)

Ans : False

14.Both the pretest loops include initialization within the statement. (T/F)

Ans : True

15.In an exit-controlled loop, if the body is executed n times, the test condition is evaluated ________times.

Ans : n +1

16.The _________statement is used to skip a part of the statements in a loop.

Ans : continue

17.for loop with the no test condition is known as ______ loop.

Ans : infinite loop

18.The sentinel-controlled loop is also known as _______ loop.

Ans : While loop

19. In a counter-controlled loop, variable known as _____ is used to count the loop operations.

Ans : index 

Question Bank Unit 3

1 – Marks

1. Explain the strlen () function.

Ans : String Length Function or It calculate number of character in an array.

2. Mathematical functions are stored in ________ header file.

Ans : math.h header file

3. Define a function in C.

Ans : A function is a group of statements that together perform a task.

4. What is an Argument?

Ans : The values that are declared within a function when the function is called are known as an argument.

5. How to pass an array to a user-defined function?

Ans : To pass an entire array to a function, only the name of the array is passed as an argument

6. A function in C should have atleast one return value. (T/F)

Ans : True

7. Explain the getchar () and putchar () functions.

Ans : Here the getchar() function takes a single character from the standard input and assigns them to a ch variable. Whereas the putchar() function prints the read character

8. What is “end-of-string” marker?

Ans : EOF

9. What is the meaning of w and s in scanf(“%ws”, string1);

Ans : W is whitespace character and S is String

10.How to read line of text from user.

Ans : using gets() function.

11.What is the rerturn type of getchar() function?

Ans  : int

12.Explain gets() function.

Ans : To read line of text from user.

13. Explain putchar() with example.

Ans : Putchar is a function in the C programming language that writes a single character to the standard output stream

14.Explain the use and functionality of atoi(string) function.

Ans : The atoi() function converts a character string to an integer value.


Question Bank Unit 4

1 – Marks

1. Define array.

Ans : An array is a data structure that contains a group of elements.

2. What is an array variable?

Ans : Array variables provide an alternative to defining multiple variables to represent multiple values.

3. How to declare one dimentional array?

Ans : datatype variablename[size];

4. An array can store similar datatypes of value. (T/F)

Ans :  we can store similar datatype only in an Array.

5. Explain multidimentional array.

Ans : datatype variablename[Row_Size][Col_Size];

6. An expression that evaluates to an integral value may be used as a subscript. (T/F)

Ans : True

7. In C, by default, the first subscript is zero.(T/F)

Ans : True

8. The declaration int x[2] = {1,2,3}; is illegal.(T/F)

Ans : True

9. The variable used as a subscript in an array is popularly known as _______variable.

Ans : Index

10.An array can be initialized either at compile time or at___________.

Ans : Run Time

11.An array that uses more than two subscript is referred to as ______________array.

Ans : Two Dimension

12._____ Keyword is used to create a structure.

Ans : struct

13.In structure, the. (dot) the operator is used for what?

Ans : Member Access

14.The structure is a collection of different data types. Is this true or false?

Ans : False

15. Structures may contain members of only one data type. (T/F)

Ans : False

16. Structures are always passed to functions by printers.(T/F)

Ans : True

17.Pointers can be used to access the members of structure variables. (T/F)

Ans : True

18.We can perform mathematical operations on structure variables that contain only numeric type members. (T/F)

Ans : False

19.The________ can be used to create a synonym for a previously defined data type.

Ans : Typedef

20.The selection operator —> requires the use of a __________to access the members of a structure.

Ans : Pointer Operator

21.The variables declared in a structure definition are called its ____________.

Ans : Member of Structure


Question Bank Unit 5

1 – Marks

 

1. Pointer variables are declared using the address operator.

Ans : False

2. Pointer constants are the addresses of memory locations.(T/F)

Ans : True

3. Pointers to pointers is a term used to describe pointers whose contents are the address of another pointer. (T/F)

Ans : True

4. It is possible to cast a pointer to float as a pointer to integer.

Ans : No

4. An integer can be added to a pointer. (T/F)

Ans : True

5. A pointer can never be subtracted from another pointer.

Ans : Yes

5. When an array is passed as an argument to a function, a pointer is passed. (T/F)

Ans : False

6. Pointers cannot be used as formal parameters in headers to function definitions. (T/F)

Ans  : False

7. Value of a local variable in a function can be changed by another function.(T/F)

Ans : True

8. A pointer variable contains as its value the________ of another variable.

Ans : Memory Address

9. The ___________operator is used with a pointer to de-reference the address contained in the pointer.

Ans : *

10. The __________only integer that can be assigned to a pointer variable is ____________

Ans : 0 and NUll

11. The pointer that is declared as ________cannot be de-referenced.

Ans : Void

12. What is a NULL pointer?

Ans : A null pointer is a special reserved value which is defined in a stddef header file. Or

Null means that the pointer is referring to the 0th memory location.