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.




Wednesday, November 16, 2022

How to Install Angular 14 CLI and Create an Angular 14 Project with Routing


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

Prepared By : Uday Shah (HOD - IT)

Contact No : +91 - 9427439007

E-Mail : udayshah80@gmail.com


How to Install Angular 14 CLI and Create an Angular 14 Project with Routing

Angular 14 id released with a lot of new features. Regarding the CLI, the most important new feature is auto completion for commands that will save you the time for looking for the right command or options.

 

In this tutorial, we’ll install the latest Angular CLI 14 version and generate a new Angular 14 project with routing.

 

Let’s get started.

 

Step 1 — Setting up Angular CLI 14

In our first step, we’ll proceed to install the latest Angular CLI 14 version.

Note: You can also use previous versions of Angular with this tutorial.

Open a new command-line interface and run the following command:

 

$ npm install -g @angular/cli

 

This will install angular/cli v14.0.0 at the time of writing this tutorial.

In the next step, we’ll proceed to create a new example project from the command-line.

 

Step 2 — Creating a New Angular 14 Project

In our second step, we’ll use Angular CLI to create our example project. Go back to your terminal and run the following commands:

 

$ cd ~

$ ng new angular-example-with-routing

 

 

You’ll get prompted for a couple of things — If Would you like to add Angular routing? Say y and Which stylesheet format would you like to use? Pick CSS.

This will set up routing in our project and set CSS as the stylesheets format for components.

Next, go to the root folder of your project and run the local development server using the following commands:

 

$ cd angular-example-with-routing

$ ng serve   

 

A live-reload server will be running from the http://localhost:4200/ address:

 

In the same series:

 

Thank You


Wednesday, November 9, 2022

C - Language One Mark Question Answer for B.C.A. and I.M.C.A.

 
-----------------------------------------------------------------------------------------------------------------------------
Prepared By : Uday Shah (HOD - IT)
E-Mail : ruparleducation@gmail.com
Contact No : +91 7600044051


C - Language One Mark Question Answer


1. In C, the control is first  transferred to ________ function and from here  rest of the  operation are carried out.

Ans : main() Function

2. How many predefine words are supported by ANSI C standard?.

Ans : 32 Keyword

3. What is the maximum length of variable name as per ANSI standar is ______  character.

Ans : 32 Character Long

4. The function of translating one language to another is called_______.

Ans : Translation

5. ________ is a preprocessor directive.

Ans : #include  ,  #define

6. By whom C language is created.

Ans : Dennis M. Ritchie

7. main() is ________ function.

Ans : user defined

8. mark_1 variable name is true?

Ans : Yes

9. ‘C’ basically identifies ______ type s of tokens.

Ans: six

10. How Many Types of Constant.

Ans: 4

11. In ‘C’  language , character can be divided into ______ categories. 

Ans: 4

12. The string always end with _______.

Ans: ‘\0’

13. a++ +a=b; statement is wrong or Not?

Ans: Yes

14. ‘C’ provides a special data type identified by keyword ____, known   as Empty Data set.

Ans: void

15. A type of value that can be assigned to identifier is known as its____.

Ans: Variable

16. Which keyword is used in C to to create a new data type ?

Ans: enum

17. How many bytes of the memory space dose a float data type use?

Ans: 4 Bytes

18. By  combination of which two symbol conditional operator is used?

Ans: ? and  :

19. Explain arithmetic operators provide by C.

Ans: Plus , Minus  , Multiply , Divide , Module

20. Explain Special Operators.

Ans: sizeof( )  , & , * , -> etc…

21. C program is  a set of blocks called______. 

Ans: function

22. ______ is a preprocessor directive.

Ans: #include  and  #define

23. C provides a facility of breaking a single program into set of small pieces known as ______

Ans: function

24. A word in C is known as a _______ of C.

Ans: token

25. How many bytes is occupied by “x” character?

Ans: 1

26. The value passed to the function are known as _____ of function.

Ans: Parameter 

27. What is the  ASCII value of \0 character ?

Ans: 0

28. Which function key is used to open the saved program ?

Ans: F3

29. C language is born in 1972, was standardized in _____ by ANSI.

Ans: 1975

30. Identifier consists of _______

Ans: All of these

31. ‘C’ language has ______ types of attributes [character set].

Ans: 4

 32. char sub[]=”C language”;  In the above statement the length of the array is ______.

Ans: 11

33. C   language uses set of _____ to relate a data with its value.

Ans: blocks

34. Hoe many byte are used by “double” data type?

Ans: 8

35. How many bytes are used if ‘int’ is prefixed with a keyword long?

Ans: 4

36. The function will not return any type of value if function is prefixed by  _____

Ans: void

37. What is the significant digit for float data type? 

Ans: 6

38. Which of the following is a data type in C? 

Ans: char

39. What is the range for a long integer ?  

Ans: -214783638 to214783637 

40. How many bytes required for unsigned long integer  datatype?

Ans:

37. What is the significant digit for float data type? 

Ans: 6

38. Which of the following is a data type in C? 

Ans: char

39. What is the range for a long integer ?  

Ans: -214783638 to214783637 

40. How many bytes required for unsigned long integer  datatype?

Ans:

41. ______ data has no value

Ans : void

42. Which of the operator is known as assignment operator?

Ans: =

43. Which is used for checking equality of two operator?

Ans: ==

44. In C _____ relational operator is to check for smaller value or equality between two operands.

Ans: <=

45. In the statement, “to_cost=qty + cost_item;” the right hand side if this statement is called a ______

Ans: C expression  

46. Which operator represent Bitwise NOT?   

Ans: ^

47. When “--“ is suffix then it is known as ______  

Ans: per decrement 

48.  Which operator is used to return size of bytes require to store an entry? 

Ans: sizeof() 

49. Which operator are used to change the flow of execution of program?

Ans: Logical

50. Which operator are used to  checking non-equality between two  operands in ‘C’ ?

Ans: !=

51. In  “3+2” , which of the following is an operand? 

Ans: 3 and 2 



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

Small Question

1. Give the rules for the naming of variables.

2. Draw all the symbols of the flow chart with their meaning.

3. What is typecasting? Explain it with an example.

4. Describe the data type available in C language.

5. Discuss equality operator.

6. Define token.

7. What is the requirement of an Algorithm?

8. Explain pre-processor in C language.

9. What is a variable? How to declare and define a variable? Explain the different types

of variables and the range of values with suitable examples.

10.Define the terms:

Compiler Interpreter Linker Loader

11.Prefix operators Vs Postfix operators

12.Discuss the process behind the compilation and execution of the C program.

13.Explain arithmetic operators available in C using examples.

14.Explain the Basic structure of C programming.

15.“Functions make C programming modular” Comment on this statement. What is the

difference between the inbuilt function and user dined function?

 

Large Question

 

1. Explain various symbols of flow chart and draw a flowchart to find the maximum of

three numbers.

2. What is an operator? Explain it. Give the list of operators in C language. Explain any

two of them.

3. Explain with a diagram that shows the compilation and execution process of the C

program.

4. Define Symbolic Constants. Explain #define in detail.

5. Discribe the characteristics and purpose of escape sequence character.




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 

Small Question 

1. Which loop is executed at least one time in any situation?

2. Describe the ladder if else with an example.

3. Explain the Switch statement with syntax and examples.

4. Explain Continue and Break statement with an example.

5. What is the general form of do-while statement, while statement, and for loop statement with example?

6. What does it mean by Unary operator and Binary operator? Explain at least 3 different unary operators used in C.

7. Explain Logical operators and relational operators available in C using

8. Explain the if-else statement.

9.Explain Do...While Loop with example.

10.Break statement Vs Continue statement

11.Explain the “nesting of loops” in detail.

12.Discuss dangling else problem.


Large Question


1. Which are the control structures available in C? Explain any one with an example.

2. Write a C program to check whether the given number is a prime number or not.

3. Develop a program that accepts a number and power which computes X^n. Using a

function to compute this X^n which takes two parameters (X, n) in the function.

4. Write all the iteration constructs and selection constructs available in C language

with syntax and suitable examples.

5. Differentiate between the Entry control loop and Exit Control loop.

6. Develop a C program to display 2, 4, 6, 8... series. The last number of the series is

accepted as input.

7. Write a program to determine whether an entered character is a vowel or not using a

switch statement.

8. Write a program to determine whether a given number is ‘odd’ or ‘even’ and print the

message NUMBER IS EVEN or NUMBER IS ODD

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.


Small Question

1. Explain function implementation in C programming language.

2. What is function call in user define function.

3. What is nesting of function.

4. What is prototyping? Why is it necessary?

5. Explain Elements of user defined function.

6. Discuss String Handling Function available in C with example.

7. Write an user define function to swap two integer numbers.

8. Explain string comparision with == operator.

9. Explain floor() and ceil() functions.

10.Explain the delay() function with an example.

 

Large Question

1. Explain function prototype in UDF.

2. Write short note on function categories.

3. Explain Modular Programming in C programming language.

4. Explain any five string handing functions.

5. Explain any five mathematical functions.

6. Write a program to accept a string (one word) from a user and display it in reverse

order.

7. Explain Call by value and Call by reference with suitable examples.

8. Write a C program to convert a given decimal number to its binary equivalent.

9. What is recursion? Write a recursive function to convert any decimal number to a

binary number.

10. Write a recursive function to find the factorial of a given number.

11. Write a program to concat (joining two strings) two strings without using any built-in

function.

12. Write a program to input a number (rupees) and find all the possible denominations.


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


Small Question


1. How can we initialize and declared structure?

2. Describe the advantages of the array.

3. Short note: pointer with structure.

4. Write a program to enter any string and count how many characters and how many

digits are there in the string.

5. How can we declare two-dimensional arrays in C? What is an array pointer?

6. Define structure. What is the purpose to declare a structure? Explain with code.

7. Explain the initialization of one-dimensional arrays, two-dimensional arrays, and

strings with examples.

8. What are strings? List and Explain operations that can be performed on strings with

examples.

9. What is compile time and run time execution of code?

10.Explain two dimensional array with example.

Large Question

1. What is an array? Write a program to sort n elements using user define function.

2. How to define a single-dimension integer array and a single-dimension character

array? What is the basic difference between an integer array and a character array?

3. Write a program to convert characters of strings to Uppercase.

4. Write a program to convert decimal numbers to binary equivalents.

5. Write short note on an array of strings.

6. Write a program to find duplicates in an array of integers.

7. Explain the Nested structure with an example.

8. Describe Two Dimensional Array with its syntax and example.

9. Write a C program to read a 2-D array and find out the minimum element and its

position.

10. Write a program to read a string and reverse that string without using an in-built

function.

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.


Small Question


1. What is a pointer? How can it be initialized?

2. Explain the advantages and limitations of the pointer.

3. What is the output of the following segment?

 

int m[2];

*(m+1) = 100;

*m = *(m+1);

printf(“%d”, m [0]);

 

4. Assuming name as an array of 15 character length, what is the difference between

the following two expressions? name + 10; and *(name+10)

5. What is dangling pointer in C?

6. What is wrong with the following code?

 

int **p1, *p2;

p2 = &p1;

 

7. A pointer in C language is

(a) address of some location

(b) useful to describe linked list

(c) can be used to access elements of an array

(d) All of the above.

Large Question

1. Describe typical applications of pointers in developing programs.

2. What is the difference between pass by value by reference in c and pass by

reference in c?

3. What are the arithmetic operators that are permitted on pointers?