-
Value of x at the Time of Execution
What is the value of x at the time of execution?
int x = 3;
if( x == 2 );
x = 0;
if( x == 3 )
x++;
else x += 2; -
-
Variables Storage
Variables should be stored in local blocks. Yes or No?
-
-
Tricky C Program questions
1)Write a C program to find a peculiar two digit number which is three times the sum of its digits.2) Bacteria are known to multiply very rapidly. If a certain container contains just one bacterium on the first day and there are twice as many on the next day. In this manner the number of bacteria in the container doubles itself everyday. Assuming that the container would be full on the 10th day with...
-
C based on Data Structure
Implement grep command in C using binary tree
TCS C/C++ Questions
1. Difference between "C structure" and "C++ structure".2. Diffrence between a "assignment operator" and a "copy constructor"3. What is the difference between "overloading" and "overridding"?4. Explain the need for "Virtual Destructor".5. Can we have "Virtual Constructors"?6. What are the different types of polymorphism?7. What are Virtual Functions? How to implement virtual functions in "C"8. What...
What is the difference between structure & union?
how can we multiply this A*B without using "*" operator?
Recursive function to compute the number of sequences of n binary digits.
How to Write a recursive function to compute the number of sequences of n binary digits that do not contain two 1s in a row. Write a main function to test this function. Input:Input consists of the number of binary digits in the sequence.Output:Output consists of the number of sequences of given binary digits that do not contain two 1s in a rowSample Input:Enter the number of binary digits in the sequence:5Sample...
Print printf without using printf
How to print printf without using printf in C program?
Big endian or Little endian
How will you find whether your system is following Big endian or Little endian representations. Write C code. In Little endian, the lowest byte is stored in lowest address.
In the following code, what is p2? typedef int* ptr ptr p1, p2;
A) an integer B) an integer pointerC) a pointerD) None of the above
Removing duplicate words from a string
cint main()
{
char arr[1000];
char *temp=NULL;
char *temp1=malloc(100);
int len;
printf("enter the string:
");
gets(arr);
len=strlen(arr);
puts(arr);
printf("len:%d
",len);
temp=strtok(arr," ");
if(temp!=NULL)
strcpy(temp1,temp);
while(temp!=NULL)
{
temp=strtok(NULL,"...Find a Solution in C, C++, C#
Given a list of integers (more than 1 million) find out how many ways there of selecting two of therm that add up to 0.
Ans