The program implements a deque (double-ended queue) using pointers in C language. It defines a node structure with data and link fields. Functions are written to add elements to both front and rear of the deque, delete from front and rear, and display the deque. The main function tests the implementation by performing sample operations on the deque and displaying the results.
Ex.1 Write a program to print the following pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Ex.2 Write a program to find bigger of three integers.
Ex.3 Write a program to calculate GCD between two numbers.
Ex.4 Write a program to find transpose of matrix.
Ex.5 Write a program which deletes an element from an array & display all other elements.
Ex.6 Write a program to calculate XA+YB where A & B are matrix & X=2, Y=3.
Ex.7 Write a program to calculate the total amount of money in the piggy bank, given that coins of Rs.10, Rs.5, Rs.2, RS.1.
& many more.....
Insertion Sort is a simple data Sorting algorithm which sorts the array elements by shifting elements one by one and inserting each element into its proper position.
http://www.tutorial4us.com/data-structure/c-insertion-sort
Ex.1 Write a program to print the following pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Ex.2 Write a program to find bigger of three integers.
Ex.3 Write a program to calculate GCD between two numbers.
Ex.4 Write a program to find transpose of matrix.
Ex.5 Write a program which deletes an element from an array & display all other elements.
Ex.6 Write a program to calculate XA+YB where A & B are matrix & X=2, Y=3.
Ex.7 Write a program to calculate the total amount of money in the piggy bank, given that coins of Rs.10, Rs.5, Rs.2, RS.1.
& many more.....
Insertion Sort is a simple data Sorting algorithm which sorts the array elements by shifting elements one by one and inserting each element into its proper position.
http://www.tutorial4us.com/data-structure/c-insertion-sort
Customer loyalty is dynamic, compelling and changing all the time. Awareness of a loyalty program’s importance was once relegated solely to a handful of sponsors of a program at a company, or those of us toiling in our industry to support the program. Today, loyalty programs are an enterprise initiative — reflective of the customer experience of brands, managed by customer service, finance, marketing, operations and IT, driven by segmented media and consumer campaigns, and expected to drive ROI, fostering lifelong connections and creating lifetime brand value.
The loyalty and customer experience landscape has been positively impacted by several exciting trends:
- The analyses of Big Data which derive meaningful consumer behavioral insights. We challenge ourselves and our clients to use it to create genuine experiences versus the more simplistic points-for-rewards stereotypes
- The need for devices and channels (think smartphones, tablets, digital signage, kiosks, radio, TV, print, etc.) to create a consistent customer experience. We need to build omnichannel loyalty programs, and then mine the data sets they create
- The importance of having programs that appeal to both the rational and emotional sides of the brain — emotional connections can include elements of gamification and social media, while rational are the tangible rewards e.g. discounts or coupons
These trends – and other insights – form the backbone of the Kobie Knowledge Quarterly Review. Our goal is to bring to you loyalty landscape commentary and analyses of where the loyalty industry is heading. We welcome conversations about loyalty through our observations, commentaries, insights and, in some cases, criticisms of the developments taking place.
We hope the Kobie Knowledge Quarterly Review leaves you with a greater appreciation that customer loyalty isn’t just about the program itself. Or even solely for driving ROI and heightening customer engagement. Loyalty, the bond an individual makes with another, is central to the human condition. It’s about reciprocity, faith, trust and at its greatest intensity, a type of moral obligation, akin to the connections we forge with family and friends.
Brands and businesses, the best ones, are no different.
Michael Hemsey, President
Kobie Marketing, Inc.
#ThroughGlass : An Introduction to Google GlassNick Moline
I was recently asked to give a presentation about Google Glass down in Saltillo Mexico at a tech conference there. These were the slides from my presentation (Video coming soon)
Create the equivalent of a four function calculator. The program should request the user to enter a number, an operator, and another number. carry out the specified arithmetical operation: adding, subtracting, multiplying, or dividing the two numbers. (Using switch statement ).ThesisScientist.com
1- Modeling Hierarchy
2- Creating Testbenches
Skills gained:
1- Reuse design units several times in a design hierarchy
2- Automate testing of design units
This is part of VHDL 360 course
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Windows Developer
Visual Studio 2015 provides the best in class C++ development experience whether you are targeting Android, iOS, Linux, Windows, or IoT. With a good mix of demos and showcase for new C++ experiences, this talk goes over six great reasons why you should migrate to Visual Studio 2015 today.
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docxeugeniadean34240
20145-5SumII_CSC407_assign1.html
CSC 407: Computer Systems II: 2015 Summer II, Assignment #1
Last Modified 2015 July 21Purpose:
To go over issues related to how the compiler and the linker
serve you, the programmer.
Computing
Please ssh into ctilinux1.cstcis.cti.depaul.edu, or use your own Linux machine.
Compiler optimization (45 Points)
Consider the following program.
/* q1.c
*/
#include <stdlib.h>
#include <stdio.h>
#define unsigned int uint
#define LENGTH ((uint) 512*64)
int initializeArray (uint len,
int* intArray
)
{
uint i;
for (i = 0; i < len; i++)
intArray[i] = (rand() % 64);
}
uint countAdjacent (int maxIndex,
int* intArray,
int direction
)
{
uint i;
uint sum = 0;
for (i = 0; i < maxIndex; i++)
if ( ( intArray[i] == (intArray[i+1] + direction) ) &&
( intArray[i] == (intArray[i+2] + 2*direction) )
)
sum++;
return(sum);
}
uint funkyFunction (uint len,
int* intArray
)
{
uint i;
uint sum = 0;
for (i = 0; i < len-1; i++)
if ( (i % 8) == 0x3 )
sum += 7*countAdjacent(len-2,intArray,+1);
else
sum += 17*countAdjacent(len-2,intArray,-1);
return(sum);
}
int main ()
{
int* intArray = (int*)calloc(LENGTH,sizeof(int));
initializeArray(LENGTH,intArray);
printf("funkyFunction() == %d\n",funkyFunction(LENGTH,intArray));
free(intArray);
return(EXIT_SUCCESS);
}
(8 Points) Compile it for profiling but with no extra optimization with:
$ gcc -o q1None -pg q1.c # Compiles q1.c to write q1None to make profile info
$ ./q1None # Runs q1None
$ gprof q1None # Gives profile info on q1None
Be sure to scroll all the way to the top of gprof output!
What are the number of self seconds taken by:
FunctionSelf secondsinitializeBigArray()__________countAdjaceent()__________funkyFunction()__________
(8 Points)
How did it do the operation (i % 8) == 0x3?
Was it done as a modulus (the same as an expensive division, but returns the remainder instead of the quotient) or something else?
Show the assembly language for this C code
using gdb to dissassemble
funkyFunction() of q1None.
Hint: do:
$ gdb q1None
. . .
(gdb) disass funkyFunction
Dump of assembler code for function funkyFunction:
. . .
and then look for the code that sets up the calls to countAdjacent().
The (i % 8) == 0x3 test is done before either countAdjacent() call.
(8 Points) Compile it for profiling but with optimization with:
$ gcc -o q1Compiler -O1 -pg q1.c # Compiles q1.c to write q1Compiler to make profile info
$ ./q1Compiler # Runs q1Compiler
$ gprof q1Compiler # Gives profile info on q1Compiler
What are the number of self seconds taken by:
FunctionSelf secondsinitializeBigArray()__________countAdjacent()__________funkyFunction()__________(8 Points) Use gdb to dissassemble countAdjacent() of both q1None and q1.
A few Programs, that are tested with compilers of respective IDEs s Bloodshed-DevC++, Visual Studio 2008, Qt 4.2. These are running successfully within console window of windows platform. So just enjoy coding. Programs in C of College days.
In C Programming create a program that converts a number from decimal.docxtristans3
In C Programming create a program that converts a number from decimal to binary. You must use a stack to complete this assignment. • Void pop() • Void push(int data) • Int top() • Int isEmpty() You must create an implementation of a stack. You may use either an array or a linked list as the underlying structure. You will, at a minimum, need to implement the following stack functions: Your program should take decimal input from the user, and convert it to binary, and simply print it out.
Solution
normal program
#include<stdio.h>
int main(){
long int decimalNumber,remainder,quotient;
int binaryNumber[100],i=1,j;
printf(\"Enter any decimal number: \");
scanf(\"%ld\",&decimalNumber);
quotient = decimalNumber;
while(quotient!=0){
binaryNumber[i++]= quotient % 2;
quotient = quotient / 2;
}
printf(\"Equivalent binary value of decimal number %d: \",decimalNumber);
for(j = i -1 ;j> 0;j--)
printf(\"%d\",binaryNumber[j]);
return 0;
}
using stack
.
Similar to Bcsl 033 data and file structures lab s5-2 (20)
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
This is a presentation by Dada Robert in a Your Skill Boost masterclass organised by the Excellence Foundation for South Sudan (EFSS) on Saturday, the 25th and Sunday, the 26th of May 2024.
He discussed the concept of quality improvement, emphasizing its applicability to various aspects of life, including personal, project, and program improvements. He defined quality as doing the right thing at the right time in the right way to achieve the best possible results and discussed the concept of the "gap" between what we know and what we do, and how this gap represents the areas we need to improve. He explained the scientific approach to quality improvement, which involves systematic performance analysis, testing and learning, and implementing change ideas. He also highlighted the importance of client focus and a team approach to quality improvement.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
Sectors of the Indian Economy - Class 10 Study Notes pdf
Bcsl 033 data and file structures lab s5-2
1. S5-2
Write a program in ‘C’ language to implement a Dequeue using pointers.
All operations associated with a Dequeue are to be implemented.
#include<stdio.h>
#include<conio.h>
struct node
{
int data;
struct node *link;};
void addqatend(struct node**,struct node**,int);
void addqatbeg(struct node**,struct node**,int);
delqatbeg(struct node**,struct node**);
delqatend(struct node**,struct node**);
main()
{
struct node*front,*rear;
int item;
front=rear=NULL;
addqatend(&front,&rear,11);
addqatend(&front,&rear,81);
addqatend(&front,&rear,16);
addqatend(&front,&rear,45);
addqatbeg(&front,&rear,20);
clrscr();
q_display(front);
printf("nnumber of elements in the que=%d",count(front));
printf("nitems taken from qn");
item=delqatbeg(&front,&rear);
printf("%d ",item);
printf("nafter deletionn");
q_display(front);
getch();
}
/*adds a new element at end **/
void addqatend(struct node **f,struct node **r,int item)
{
struct node *q;
q=(struct node*)malloc(sizeof(struct node));
q->data=item;
q->link=NULL;
/**if q empty**/
if(*f==NULL)
*f=q;
else
(*r)->link=q;
*r=q;
}
/*add at begin**/
void addqatbeg(struct node** f,struct node** r,int item)
{
struct node *q;
int t;
Page 1
2. S5-2
q=(struct node*)malloc(sizeof(struct node));
q->data=item;
q->link=NULL;
/**if q empty**/
if(*f==NULL)
*f=*r=q;
else
q->link=*f;
*r=*f;
*f=q;
}
/*remove from front ***/
delqatbeg(struct node** f,struct node** r)
{
struct node *q; int item;
if(*f==NULL)
printf("q empty");
else
q=*f;item=q->data;
*f=q->link; free(q);
/*if q becom empty after delet*/
if(*f==NULL)
*r=NULL;
return item;
}
/*remove from rear end ***/
delqatend(struct node** f,struct node** r)
{
struct node *q,*rleft,*temp; int item;
temp=*f;
if(*r==NULL)
printf("q empty");
else
/*traverse q to find the prevous element adrs*/
while(temp!=*r)
{rleft=temp; temp=temp->link;}
/*delete the node*/
q=*r;item=q->data;
free(q);
*r=rleft;
(*r)->link=NULL;
/*if q becom empty after delet*/
if(*r==NULL)
*f=NULL;
return item;
}
/*to display**/
q_display(struct node *q)
{
printf("nfront->");
while(q!=NULL)
{
Page 2