Tuesday, August 11, 2020

UGC NET Questions Based on C Language || Interview Questions Based On C Language

 

C INTERVIEWS QUESTIONS

 

1.                 What's the C language?

2.                 Who has developed C language?

3.                 Describe the history of the C programming language.

4.                 Where is the C programming language used or the C language used?

5.                 What's the difference between C and C++?

6.                 What is the compared to the top-down approach and the bottom-up approach in programming languages?

7.                 Difference between Java and C?

8.                 C language was developed in which language?

9.                 Which year C language has been developed?

10.            What does programming language mean and give some examples?

11.            Describe the C standards.

12.            What are the key features of the C-language or the characteristics of the C-language?

13.            What's C embedded in it?

14.            Which level does the C language belong to?

15.            What do you mean by high-level, middle-level and low-level languages and give each of them an example?

16.            What is the difference between structured, object-oriented, and non-structure-oriented programming language?

17.            What's the compiler?

18.            What's the difference between the assembler, the compiler, and the interpreter?

19.            What is printf()?

20.            What is scanf()?

21.            What does the protocol mean?

22.            The execution of the C program starts with which function?

23.            What are all the sections that the C program can and must-have?

24.            What's the IDE?

25.            Please list some of the C compilers.

26.            What is the C-language header file?

27.            Is the case of C language-sensitive?

28.            What's the macro? Why are we using a macro?

29.            What is the type of data in C?

30.            What is the difference between the type of int, char, float, and double data?

31.            What's the use of the sizeof() function in C?

32.            What's the change in C?

33.            What are the different types of C modifiers?

34.            What's the Enum in C?

35.            What's the void in C?

36.            What's a C token?

37.            What kind of C tokens are there?

38.            What's a C identifier?

39.            What's the keyword in C?

40.            List some of the keywords available in the C language.

41.            What's the constant in C?

42.            What are the constant types in C?

43.            What's the variable in C?

44.            What is the difference in C between constant and variable?

45.            Can the name of the variable start with numbers?

46.            What is the difference between the declaration of variable and the definition of a variable in C?

47.            What are the different variable types in C?

48.            What's the local variable in C?

49.            What's the global variable in C?

50.            What is the C environment variable?

51.            What's the operator in C?

52.            What are the different types of C operators?

53.            What is the syntax for the C ternary operator?

54.            What is the C arithmetic operator?

55.            What's the assignment operator in C?

56.            What is the C relational operator?

57.            What's the logical C operator?

58.            What's the C bitwise operator?

59.            What are the decision control statements in C?

60.            What are the loop control statements in C?

61.            What's the difference between while and do-while loops in C?

62.            What is the difference between a single equal "=" and a double equal "= =" operator in C?

63.            What is the difference between the post-increment operator and pre-increment operator?

64.            What is the difference between a post-decrement operator and a pre-decrement operator?

65.            Explain the "*" and "&" operators in C?

66.            What happens if the break statement is not used in the C switch case?

67.            Why is the default statement used in the C switch case?

68.            What is the "goto" statement?

69.            What value is assigned to the variable X if a = 10, b = 20, c = 30, d = 40 for the expression X = a / b+c*d-c?

70.            What is the value assigned to the variables below? int X1 = 13/3; int X2 = 13%3;

71.            What is the difference between the auto variable and the C registry variable?

72.            What's the difference between the auto variable and the static variable in C?

73.            Where is the typecast function not to be used in C?

74.            How many arguments can be passed to the C function?

75.            What's the static function in C?

76.            If you want to run the C program even after the main function is finished, which function can be used?

77.            Is it possible to call atexit() more than once in a C program?

78.            What's the exit() function in C?

79.            Difference between exit() and return() in C?

80.            What is the use of "# define" in C?

81.            What is the syntax of the comments in C?

82.            What's the "# #" operator in C?

83.            What's the C pragma? Or how are you going to perform functions before and after the main function in the C program?

84.            How are you going to override the existing macro in C?

85.            How to check whether or not the macro is defined in the C program?

86.            What's the difference between memcpy() and strcpy() functions in C?

87.            What's the difference between memcpy() and memmove() functions in C?

88.            Is there any built-in library function in C to remove the leading and trailing spaces from the string? How are you going to remove them in C?

89.            What is the difference between the functions of strcpy() and strncpy() in C?

90.            Can array subscriptions have a negative value in C?

91.            What's the difference between the array and the C string?

92.            What's the pointer in C?

93.            What are the zero pointers in C?

94.            What's the NULL in C?

95.            What's the void pointer in C?

96.            What's the dangling pointer in C?

97.            What's the wild pointer in C?

98.            What's the C file pointer?

99.            When can the void pointer and the zero pointers be used in C?

100.       What's a C const pointer?

101.       Is the arithmetic pointer a valid one? Which arithmetic operation should not be valid in the pointer? Why?

102.       Is void arithmetic a valid pointer? Why?

103.       What's the difference between zero and Null?

104.       What is the difference between the zero pointers and the uninitialized pointer in C?

105.       Can the size of the array be declared at run time?

106.       What's a memory leak in C?

107.       What's going to happen when we try to access the zero pointers in C?

108.       What does segmentation fault or memory fault mean in C?

109.       What does the core dump in C mean?

110.       Can a pointer be freed in C more than once? What happens if we do it? Or can a pointer be set free twice in C?

111.       What's the size of the int pointer and the char pointer in C?

112.       How are you going to print the value and address of the pointer variable (example int * ptr) in C?

113.       How are you going to print the value and address of the normal variable (example int ptr) in C?

114.       What are the functions of the library and their use in the C language? Can we write our own features and include them in the C library?

115.       Can the variable name start with the underscore in C?

116.       Can the name of the variable have special symbols in C?

117.       What's the inline function in C?

118.       Is it possible to print "Hello World" in C without a semicolon? How is that?

119.       What is the scope of the local, global, and environmental variables in C?

120.       Why do we use C pointers?

121.       What's the static variable in C?

122.       What is the external and static function in C?

123.       What's the difference between the pointer and the array in C?

124.       Can variables in C be both volatile and constant?

125.       What is the main() function used in C?

 

 


Tuesday, August 4, 2020

Constants Or Literals In C language || Literals in programming Language || Computer Language

C Literals or Constants

 



A constant is a named memory location that holds only one value throughout the execution of the program.

In C programming language, the constant is similar to the variable, but the constant only holds one value during the execution of the program. This means that once a value is assigned to a constant, that value can not be changed during the execution of the program. Once the value is assigned to the constant, the value is fixed throughout the program. A constant can be defined as follows:

 

Type of C Constants

 

Numeric Constants

Integer Constant

An integer constant may be a decimal integer or an octal integer or a hexadecimal integer. The decimal integer value is specified as the direct integer value, while the octal integer value is prefixed with 'o', and the hexadecimal value is prefixed with 'OX.'

 

An integer constant may also be an unsigned type of integer constant or a long type of integer constant. The unsigned integer constant value is suffixed with 'u' and the long integer constant value is suffixed with 'l' while the unsigned long integer constant value is suffixed with 'ul.'

  

Integer Constants are following type:

Decimal --> 123

Octal --> 1576

Hexa --> 59AE

Unsigned --> 50u

Long --> 30I

unsigned long --> 100ul

 

 Floating Point constants

The floating-point constant must contain both the integer and the decimal components. It may also contain an exponent part some times. When a floating-point constant is shown as an exponent, the value must be suffixed with 'e' or 'E.'

 

For example,

 

The floating-point value of 3.14 is shown as 3E-14 in exponent form.

 

 

Character Constants

1.     Single Character Constants

 

A character constant is a symbol that is enclosed in a single quotation. The constant character has a maximum length of one character.

 

Example :

 

'S'

'5'

'>'

'$'

 

2.     Escape Sequence or backslash Characters

 

There are some predefined character constants called escape sequences in the C programming language. Each escape sequence has its special functionality, and each escape sequence is prefixed with the '\' symbol. These escape sequences are used for the output function called 'printf().'

 

Escape Sequence Table:

Escape Sequence name

Symbol

Description

Alert

\a

Make an Alert, such as a beep

Backspace

\b

Moves the cursor Back one space

Formfeed

\f

Move the cursor to next logical page, Formfeed Page Break

Newline

\n

Move the cursor to next line, Newline

Carriage return

\r

Move the cursor to the beginning of the line, Carriage Return

Horizontal tab

\t

Print a Horizontal Tab

Vertical tab

\v

Print a Vertical Tab

Backslash

\\

Print a Backslash

Single Quote

\'

Print a single-quote

Double Quote

\"

Print a double quote

Question Mark

\?

Print a Question mark

Octal/hex number

\(number)

Translates an octal / hex number from a char

 

 

 

 

3.     Trigraph Sequence

 

Release of various reasons for using trigraphs. One reason is that some keyboards may not have keys that cover the whole character set of the C Language, and therefore the input of a special character may be difficult. Using the Trigraph sequence concept, we can use these characters. Each sequence comes in three combinations of characters, i.e. two question marks??) (followed by a special character.

 

Example:

hash sign --> (??=)  

 

 Trigraph Sequence Table:

Trigraph Sequence

 

Replaced With

??=

# (hash) sign

??(

Left parenthesis

??)

Right parenthesis

??<

Left curly brace

??>

Right curly brace

??!

| vertical bar

??/

\ bach slash

??'

^ caret

??-

~ tilde

 

 

String Constants

The string constant is a series of zero or more characters. The string constant is a collection of characters, digits, special symbols, and escape sequences that are enclosed in double-quotes.

 

 

In a single line, we

define the string constant as follows ...

 

 

"This is the studybeat"

"This is a man"

 

 

We can define string constants using multiple lines as follows.

 

 

"This\ 

is\

the\    

studybeats"

 

 

We can also define the constant string by separating it with white space as follows ...

 

 

"This"  "is" "the" "studybeats"

 

 

 

 

How to Use of C constants

 

 

All of the above three define the same string constant.

 

In the C programming language, constants can be created using the following two rules:

 

1. Use the keyword 'const'

2. Use the '# define' preprocessor

 

 

Use the keyword 'const'

 

 

We create a constant for any data type using the 'const' keyword. To create a constant, we prefix the variable declaration with the keyword 'const.'

 

 

The general syntax for creating a constant using the keyword 'const' is as follows ...

 Const datatypename constantname;

OR

Const datatypeName  constantname= value;

 

 

 

Example

const int x = 10 ;

Here, 'x' is an integer constant with a fixed value 10.

 

 

Example Program

#include<stdio.h>

#include<conio.h>

void main()

 {

   int i = 9 ;

   const int x = 10 ;

   i = 15 ;

   printf("i = %d\nx = %d", i, x ) ;

}

Output:

i=15

x=10

Use the '# define' preprocessor

 

Constants can also be created using the '# define' preprocessor directive. When creating a constant using this preprocessor directive, it must be defined at the beginning of the program (because all preprocessor directives must be written before the global declaration is made).

 

 

Use the following syntax to create a constant using the '# define' preprocessor directive ...

 

#define constantname value

Example

#define x 10

Here, x is a constant with value 10

 

 

Example Program

#include<stdio.h>

#include<conio.h>

 

#define  x 10

 

void main()

{

   int y,mul;

   printf("Please enter the value of Y: ") ;

   scanf("%d", &y) ;

   mul = x*y ;

   printf("multiplication of Y with 10 is : %d", mul) ;

}


Monday, July 27, 2020

What kind of education do you need to build a great tech company? || Startups Weekly

Startups Weekly: What kind of education do you need to build a great tech company?

 

Tech Group


Easy start-up ideas have all been made — those that just required some homebrew hardware hacking or PHP dorm-room coding to get it off the ground. You may need several advanced technical degrees to achieve something significant these days. At least that's what Danny Crichton is gloomy about this week, in an essay entitled "Today's Two Ph.D. Problem of Startups." Here's a new example:

 

Take synthetic biology and the future of pharmaceuticals, please. There is a popular and very well-funded thesis on crossing machine learning and biology/medicine together to inspire the next generation of pharmaceutical and clinical treatments. The datasets are there, the patients are ready to buy, and the old ways of finding new candidates for disease treatment look positively ancient against the more deliberate and automated approach of modern algorithms.

 

Moving the needle even slightly here, however, requires an enormous knowledge of two very hard and disparate fields. AI and bio are domains that become extremely complex extremely quickly, and where researchers and founders quickly reach the frontiers of knowledge. These are not "solved" fields of any kind of imagination, and it's not unusual to quickly get a "No one really knows" answer to a question.

 

Even when you try to build teams with the right combinations of knowledge, he argues, each domain is now so complex that the mesh of skills required is far more difficult to achieve than previous efforts.

 

In part, I disagree, because innovation does not map existing domains in such a simple way. Computer scientists in the '60s didn't expect personal computing to be a thing until the homebrewers at Apple proved it. Enterprise software industry experts last decade did not expect the developers of consumer apps to apply their bottom-up growth skills and beat the sophisticated offerings made by the incumbents. I expect all sorts of arcane academic ideas to be blended with market demand in unexpected ways that break apart the models we have today, led by people who might not check all the boxes in traditional fields.

 

This includes the Ph.D. itself and the education sector. Which is where Danny and I are in agreement. Applying software to education has been a struggle because success requires understanding two disciplines, and he concludes that the way we learn will have to be broken down and reformed:

 

"We can't wait until 25 years at university is over and the people have graduated. Haggard was 40 years old before they could take a shot at some of those fascinating intersections. We need to build bridges to those gaps where innovation has not yet been achieved.

 

 

Edtech 's top Future


Tech Group

Almost to prove Danny's first point, some of the biggest companies in the world. Today, edtech was founded by technical experts who were also university professors. Companies like Coursera are now raising their late-stage funding rounds to the top of a pandemic-fueled online higher learning boom.

 

A potential gig economy for education created through online small-group learning would have a significant impact on both the supply and demand side of online education. Giving educators the ability to teach online from home opens up the opportunity for many more people around the world who might not have considered teaching otherwise, and this can greatly increase the supply of teachers around the world. It is also capable of alleviating the discrepancy that exists between the quality of teaching in urban and rural areas by enabling students to have access to the same quality of teaching independently of their location...

 

Companies in this area, such as Outschool and Camp K12, are pre-college. But take a look at all those who are trying to teach data science, product management, and other concepts that traditional industries need to incorporate to innovate more quickly, and you can see the solution that Danny hopes will emerge. One day soon, you might be able to quickly learn a new skill that you need to get a job — or a medical breakthrough.

 

 

 

Planning your own equity after an IPO



Do you think the next Amazon or Google is your unicorn employer? Are you ready to hold on to the stock of a potential winner through all the ups and downs that happen to any company? If you haven't already, consider diversifying sooner rather than later, Peyton Carr, Startup Financial Advisor, writes this week in a series on the subject:

 

Any stock position or exposure greater than 10% of the portfolio is considered to be a concentrated position. There are no hard numbers, but the appropriate level of the concentration depends on a number of factors, such as your liquidity needs, the overall value of the portfolio, the appetite for risk and the longer-term financial plan.

 

The company's "stock" in your portfolio is often only a fraction of your overall financial exposure to your company. Think about your other potential sources exposure, such as limited stocks, RSUs, options, employee share purchase programs, 401k, other capital compensation plans, as well as your current and future pay streams linked to the success of the company. In most cases, the prudent path to achieving your financial objectives involves a well-diversified portfolio.


Government plans ban on PubG, 273 other apps after the action against 59 Chinese apps || Ban Android Games

Government plans ban on PubG, 273 other apps after the action against 59 Chinese apps

 

PubG


Following last month 's ban on TikTok and 59 other Chinese apps, the government has created a new list of apps to examine whether they pose a risk to national security or privacy.

 

This time, the Center has kept 275 Chinese apps on the radar, including PubG, Zili, Resso, AliExpress, and ULike, according to the Economic Times report. Apps from other Chinese internet and tech majors like Meitu, LBE Tech, Perfect Corp, Sina Corp, Netease Games, Yoozoo Global are also on the list.

 

Although PubG videogame was developed by a subsidiary of South Korean video game company Bluehole, it is also supported by China's most valuable internet major Tencent. On the other hand, Zili is owned by Xiaomi, Resso, and ULike by TikTok, owner of ByteDance, and AliExpress by Chinese e-commerce giant Alibaba.

 

India is the biggest market for PubG. According to estimates by Sensor Tower, PubG has generated about 17.5 crore installations to date.

 

The daily said that either there would be a ban on all 275 Chinese apps or none at all. Chinese internet companies have around 300 million unique users in India. Citing a government official, the daily addition of the above-mentioned apps has been red-flagged for security reasons, while others have been listed for breach of data sharing and privacy concerns. Besides, the Government is examining the alleged flow of data from these apps to China, which poses a threat to the sovereignty and integrity of India.

 

Meanwhile, the Ministry of Electronics and Information Technology (MeitY)sent 77 questions to the 59 banned Chinese apps. The Center asked questions such as whether they censored content, worked on behalf of foreign governments, or engaged influencers, among others. The Ministry also gave these companies three weeks to respond, i.e. the first week of August.

 

On June 29, the Center banned 59 Chinese-linked apps, including TikTok, Shein, UC Browser, and BeautyPlus, saying they were detrimental to the sovereignty, integrity, and security of the country. Last week, it wrote a letter to Chinese firms warning that the continued availability and operation of these prohibited apps was, directly or indirectly, an offense under the IT Act and other applicable laws.


Climate Crisis and Innovation: Navigating Earth's Future

Climate Change: Recent Events and Technological Solutions 1. The Escalating Climate Crisis The climate crisis has intensified in recent year...