How can you call a function given its name as a string?
we have to construct a table of two field structures,where the first field is the funtion name as a string and the second field is just the function name.then search the table to get a string match in the first field and use the second field to call the function.
C program to add the two numbers?
hi,this is jst a simple program to add numbers.i think u wil b satisfied wit ths
#include<stdio.h> //input output header file
#include<conio.h>
main()
{
int a,b,c;
clrscr();
printf("enter any number");
scanf("%d",&a);
printf("enter any number");
scanf("%d",&b);
c=a+b;
printf("%d",c);
getch();
}
default constructor is used only when the programmer does not use a constructor to initialize objects. Once the programmer defines a constructor then the default constructor is no longer used
Who would you cast for the Secret Circle by L J Smith?
I would cast Megan Fox as Faye, Christian Serratos as Laurel, Taylor Lautner as Nick (or Steven Straight) and the rest I'm unsure of. Can't wait until the tv show comes out! I heard it was coming in March!!
How do you attach parity bit in c language?
for example:
unsigned char attach (unsigned char byte, unsigned char bit)
{
unsigned char mybyte;
mybyte = byte&0x7f;
if (bit) mybyte |= 0x80;
return mybyte;
}
What is semantic and syntactic?
Syntax refers to the set of rules that govern what sequences of symbols are valid programs or not. Semantics refers to what the various syntactic constructs actually mean, what they do, and so on.
Does there exists any other function which can be used to convert an integer or a float to string?
jkhhg ldsajdsa dlsajaslsala laja alala alala alalaalal alal alal alala a;ala aja,a
How do you Write a C program for matrix?
/* multiplication of a 3*3 matrix*/
#include<stdio.h>
main()
{
int a[3][3],b[3][3],c[3][3];
int i,j,k;
printf("enter the elements in A matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("enter b matrix:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
scanf("%d",&b[i][j]);
}
}
for(i=0;i<=2;i++)
{
printf("\n");
for(j=0;j<=2;j++)
{
c[i][j]=0;
for(k=0;k<=2;k++)
{
c[i][j] = c[i][j]+a[i][k] * b[k][j];
}
}
}
printf("multiplication matrix is:\n");
for(i=0;i<=2;i++)
{
for(j=0;j<=2;j++)
{
printf("%d\t",c[i][j]);
}
printf("\n");
}
}
Pre indexing post indexing difference between?
what are the differents between preindexing and post indexing?
What is the difference between a string and an array?
Nothing whatsoever. A string is simply an array of type char.
In some programming languages, such as C, a string is an array of char (or short), terminated with a null \0.
An array is just a fixed size of collection, a container to hold things/objects. If all the elements in the container are characters (of char), then we may call it a string, sometimes a byte array (because each character can be represented as a byte).
An array of 7 different days, it maybe a WEEK, or just the birthdays of 7 dwarfs. Then they are nothing to do with strings.
A data item (or variable) is described as a "string" type when it contains some number of characters. Those characters can usually be anything in the system's accepted list of codes. Most systems use ASCII, so a string can include the letters a-z, A-Z, numbers 0-9, and special characters like ~!@#$%^&*()_+-=[]\{}|:";'<>?,/. A string is treated as a single object, although most programming languages have methods to break strings apart (called sub-stringing). In the Perl language, strings are named $something.
An array is a collection of individual data items, sort of like a list. Each element in an array can be referred to in a program by its position in the list. In the Perl language, an array would be named @SOMETHING. The first element in the array would be named $SOMETHING[0], the second $SOMETHING[1], and so on. Each element can be a string, or some other data type.
Other data types would be integers (positive or negative whole numbers), floating point (decimal numbers like 3.14159 or 2398.41; it can be more complicated than this, but that's another story), and a few more exotic types.
In the C programming language a string is actually the same as an array of characters. The last character in a C string is a zero byte which indicates the end of the string.
// Define and initialize input buffer
char inputBuffer[256];
memset(inputBuffer, '\0', 256);
// Get input
scanf("%s", inputBuffer);
// Display exactly what the user typed in
printf("%s\n", inputBuffer);
m-way trees are mainly useful when data exist in large amount
sparse array is one which has contents lower than its maximum size, that is the array has free or empty locations....
Matrix addition of a 33 matrix?
Fix 33 table changes : macierz1[][],macierz2[][],... and its size (write size to brackets)
Fix a matrix to result : wynik[][], and int i,j.
for(i=0;i<size_of_your_matrix;i++)
for (i=0;i<size_of_your_matrix;i++)
wynik[i][j]=macierz1[i][j]+...+macierz33[i][j];
Or instead of 33 changes: macierz[33][size][size]
for(k=0;k<33;k++)
for(i=0;i<size_of_your_matrix;i++)
for (i=0;i<size_of_your_matrix;i++)
wynik[i][j]=wynik[k][i][j]+macierz[k][i][j];
(dont forget about initializing wynik as 0 in 2nd case)
I believe it's simply a list of objects, with each object pointing to the next object. There is a value which keeps track of the list location (the head). Also the last object points to null.
head ----- data|pointer -----> data|pointer -----> data|pointer -----> data|NULL
This is a very basic form of such a list, and it's pretty inefficient, especially when it comes to adding values to the end of the list. A way to improve that would be to add a 'tail' variable so the last value can be easily found.
C plus plus program to find all even numbers between 100 and 150 using for loop?
#include
int main(){
int i;
for(i=2;i<=100;i=i+2){
printf("%d\n",i);
}
}
A backtrace is another term for a stack trace, in computing, a hierarchical trace of the function calls made by a program, as used in debugging.
Which function is supported by an application program?
which function is support by an application program
Is there any pointer called ds cs es ss pointer in C programming?
yes, ds cs es ss are pointers available in c which is used to refer memory segments