answersLogoWhite

0

📱

C Programming

Questions related to the C Computer Programming Language. This ranges all the way from K&R to the most recent ANSI incarnations. C has become one of the most popular languages today, and has been used to write all sorts of things for nearly all of the modern operating systems and applications. It it a good compromise between speed, power, and complexity.

9,649 Questions

What is a site parameter?

A site parameter is a variable or condition specific to a particular location that can influence various factors such as design, construction, or environmental considerations. Examples include geographic features, climate conditions, soil types, and local regulations. In planning and engineering, understanding site parameters is essential for making informed decisions that align with the unique characteristics of the location.

DrWatson Postmortem Debugger?

As far as I can figure, the Dr Watson Postmortem Debugger is a Microsoft program installed on Windows XP units.

The program is basically designed to crash when it detects that another program crashes and creates a log of it.

This program was replaced by the modern crash reporting system built into all modern Windows operating systems.

This program can remain on your computer if you have it, however, if it causes your system to perform slowly, or you wish to remove it, there are several ways to do so.

I unfortunately have not yet successfully disabled it, however, there are numerous methods and websites accessible from Google to help you remove it.

Just search for "Dr Watson Postmortem Debugger removal"

What are the functions of a storage class?

There are four storage class specifiers in C and C++. These are -

1. auto : The storage specifier auto refers to automatic variable declaration. The life of an automatic variable is the time during which its parent function is running. The scope of an auto variable is the function scope. They can be accessed only from their parent functions.

Syntax : auto int a;

2. register : A register variable has all the characteristics of an auto variable. The only difference is that auto variable uses the main memory to store data and register uses the CPU registers.

3. extern : This storage specifier is used to declare a global variable. The life of these variables is the time during which the program runs.

How do you make a program like 5142332415 using looping?

There is insufficient information in the question to answer it. Please rephrase the question.

What is better strcpy or memcpy?

They do different things, so they are uncomparable.

PS: strcpy can be implemented with strlen+memcpy:

char *strcpy (char *dest, const char *src)

{

size_t len;

len= strlen (src);

memcpy (dest, src, len);

return dest;

}

How do you clean dialer files from c restore?

If you are running winxp, (1)Click Start,,, (2)go to my computer. On the top left hand side of the window (3)click "View system information" under "System Tasks". In the System Properties Window, (4)click the "System Restore" Tab. There is a chech box beside Turn off System Restore,,, (5)Place a check mark there and (6)click apply,, ( this deletes all your previous system restore point, thus deleting the virus, trogan, worm, dialers etc)....

IMPORTANT: (((Make sure you repeat the same steps to turn system restore back on)))

Make sure you run a good anti-virus , firewall, spyware remover and adware remover regularly.... If you need the name of some good free ones I will be more than happy to let you know Marz

How do you create this shape using the for loop in c?

There is insufficient information in the question to answer it. You did not specify what "this shape" was. Please restate the question.

Write a program to compute the average of the squares of the numbers from 1 to 10?

main()

{

sum=0;

float avg=0.0;

int sqr[10];

for(i=1;i<=10;i++)

{

sqr[i]=(i*i);

}

for(i=1;i<=10;i++)

{

sum=sum+sqr[i];

}

avg=sum/10;

dts it !!!

What are the five types of knowledge produced from data mining?

Acquired knowledge comes from outside the organization. In some

cases, an organization purchases the knowledge from another source.

Similarly, information can be leased or rented. For example, some "rented"

knowledge comes from consultants. Institutional research relies heavily on

rented knowledge such as U.S. Census Data, Integrated Postsecondary

Education Data System (IPEDS) files, research methods, to name a few.

Davenport and Prusak note that "originality is less important than usefulness"

in acquired knowledge.

Dedicated resources are those in which an organization sets aside

some staff members or an entire department (usually research and development)

to develop within the institution for a specific purpose. These dedicated

resources are usually protected from competitive pressures to develop

profitable products. Offices of institutional research are by themselves good

examples of dedicated resources to the extent that they generally serve specific

purposes, which are not duplicated or shared by other departments and

offices. This is particularly true when institutional research functions are

centralized within one office.

OVERVIEW OF KNOWLEDGE MANAGEMENT 11

Fusion is knowledge created by bringing together people with different

perspectives to work on the same project. The resulting projects represent

more comprehensive expertise than possible if members of the team represented

one perspective. But Davenport and Prusak note that fused knowledge

often involves conflict, and a team needs time to reach a shared knowledge

and language. Cross-functional teams are becoming popular in higher

education institutions and are examples of fusion. Institutional researchers

are often called upon to participate in various teams due to their expertise.

Adaptation is knowledge that results from responding to new processes

or technologies in the market place. The expansion of on-line instruction

offered by higher education institutions is an example of adaptation.

Knowledge networking is knowledge in which people share information

with one another formally or informally. Knowledge networking often

occurs within disciplines; for example, an institutional researcher communicating

with another.

What is 105fto c?

To convert 105 degrees Fahrenheit (°F) to Celsius (°C), you can use the formula: ( C = (F - 32) \times \frac{5}{9} ). Plugging in the values, ( C = (105 - 32) \times \frac{5}{9} ), which simplifies to ( C = 73 \times \frac{5}{9} ), resulting in approximately 40.6°C. Therefore, 105°F is about 40.6°C.

How do you implement depth first search in C using arrays?

#include<stdio.h>

#include<conio.h>

char que[20];

int front=0, rear=0, n;

char arr[20];

int bfs(int );

char ajMat[20][20];

char b[20];

void display();

int p=0;

int main()

{

char v;

printf("Enter the number of nodes in a graph");

scanf("%d",&n);

printf("Enter the value of node of graph");

for(int i=0; i<n; i++)

{

scanf("%s",&b[i]);

}

printf("Enter the value in adjancency matrix in from of 'y' or 'n'\n");

printf("If there exits an edge between two vertices than 'y' otherwise 'n'\n");

for(int i=0; i<n; i++)

printf(" %c ",b[i]);

for(int i=0;i<n; i++)

{

printf("\n%c ",b[i]);

for(int j=0; j<n; j++)

{

printf("%c ",v=getch());

ajMat[i][j]=v;

}

printf("\n\n");

}

for(int i=0;i<n;i++)

bfs(i);

display();

getch();

}

void display()

{

printf("BFS of Graph : ");

for(int i=0; i<n; i++)

printf("%c ",arr[i]);

}

void insert(char val)

{

que[front]=val;

front++;

}

char del()

{

rear=rear+1;

return que[rear-1];

}

bool unVisit(char val)

{

for(int i=0; i<front; i++)

{

if(val==que[i])

return false;

}

return true;

}

int bfs(int i)

{

char m;

if(front==0)

{

insert(b[i]);

}

for(int j=0; j<n; j++)

{

if(ajMat[i][j]=='y')

{

if(unVisit(b[j]))

{

insert(b[j]);

}

}

}

m=del();

arr[p]=m;

p++;

return 0;

}

What do you need for a valid recursively defined function?

Nothing special... here is an example:

unsigned power (unsigned a, unsigned b)

{

if (b==0) return 1;

else return power (a, b-1) * a;

}

Explain Externally initiated signals and interrupt in 8085?

The 8085 Microprocessor has five interrupts signals that can be used to interrupt a program execution. They are:

  1. INTR-Interrupt Request (Input): This is used as a general -purpose interrupt.
  2. INTA-Interrupt Acknowledge (Output): This is used to acknowledge an interrupt.
  3. RST 7.5, RST 6.5, RST 5.5-Restart interrupts (Inputs): These are vectored

    interrupts that transfer the program controls to specify memory locations. There have higher priorities than the INTR interrupt. Among these three, the priority order is 7.5, 6.5 and 5.5.

  4. TRAP (Input): This is a non-mask able interrupt and has the highest priority.

In addition to the interrupts, three pins - RESET, HOLD, and READY - accept the externally initiated signals as inputs. The HOLD signal indicates that a peripheral such as a DMA (Direct Memory Access) controller is requesting the use of the address and data buses. The READY signal is used to delay the microprocessor READ or WRITE cycles until a slow-responding peripheral is ready to send or accept data. When this signal goes low, the microprocessor waits for an integral number of clock cycles until it goes high. Lastly, when the RESET IN signal goes low, the program counter is set to zero, the buses are tri-stated, and the MPU is reset and the RESET OUT signal indicates that the MPU is being reset and used to reset other devices.

To respond to the HOLD request, the 8085 Microprocessor has one signal, called HLDA (Hold Acknowledge). It acknowledges the HOLD request.

Write algorithm to delete last node in circular linked list?

This depends on whether the list is singly or doubly(or multiply) linked, and on the actual implementation of the list. For example, you can write a CDLL(circular doubly linked list) without maintaining your beginning or ending nodes, using only a current pointer, thus this question doesn't really apply as there would be no "last" node and thus it would be like deleting any node.

A typical implementation of a circular singly-linked list (CSLL) list actually maintains the pointer to the last element (hence it's FIFO nature) and thus there are both last and first nodes.

This deletion is a little tricky. Consider that you have situations where the next pointer will point to the current element. On the other hand, you also have a situation where there are n-values that you have to iterate over to find the next-to-last value. Typically you would delete the first node in these lists, again dictated by the FIFO nature of these lists, but deletion of the last node is also not impossible.

set struct node *last to list->end

if (list->end->next == list->end){

set list->end to null (leaving an empty list)

} else {

while(true){

if(last->next == list->end){

break

}

set last to last->next

}

set link->last to list->end->next (this temporarily sets list's end node to current first node)

free last->next (frees the last node)

set last->next to list->end (set the new last node next pointer to the first node)

set list->end to last (set the list's end node to the new last node)

}

Why are all Header Files not declared in every C Program?

We only include the headers we actually use. It would be impractical to include every single header in every single program.

How do you write assembly programs for PIC Microcontroller 18f458?

By using the appropriate programmer for the chip. See related links for the MPLAB PM3 Universal Device Programmer.