-
Virtual Method
Base class has some virtual method and derived class has a method with the same name. if we initialize the base class pointer with derived object, calling of that virtual method will result in which method being called?
-
Header File
Why should we use header file?
-
Execute Shell Command
How will you execute shell command without using system command in C-language? Write a program to execute ls -l and redirect the output to a file, without using system command ?
-
Null Pointers
What is the use of null pointers?
-
Find Number of Occurrences
How will you find the number of occurrences of a particular string in the given input string?
-
Pointer Variable
How to declare and initialize a pointer variable?
-
Convert int to string
Convert int to string without using itoa in C language
-
Read Specified Number of Elements
What function will read a specified number of elements from a file?
-
Function to find Occurrences
Write a function Occurrences() in a language of your choice that takes in two strings. The first is a search string, and the second is a sentence. For example, running the function:Running Occurrences ("o", "Red Gate Software - Ingeniously Simple Tools")will output: Occurrences of 'o': 4Occurrences ("at", "The cat sat on the mat")will output: Occurrences of 'at': 3charles.
-
Volatile Variables
Where does the variables with volatile keyword, gets stored??
-
Find directory from the file
A file containing the one million directories , then find the a directory from the file and print it in c language.
-
-
How to write simple C Calender program ?
Should return the week of the date
-
Print the output as follows by a c program without using loops?
print the output as follows by a c program without using loops?
1
1 2
1 2 3
1 2 3 4
1 2 3
1 2
1 -
Print number of distinct characters in a string.
How do I implement a C program that reads a string and prints a table with the number of occurrences of each character in the string.
Ex: Rubber. r = 2, u = 1, b = 2, e = 1.C code explanation
struct marks
{
int p:3;
int c:3;
int m:2;
};
void main()
{
struct marks s={2,-6,5};
printf("%d%d%d",s.p,s.c,s.m);
}Why integer range -32768 to 32768
Why integer range -32768 to 32768 and actual meaning of storage size 2 bytes ?
A program in C using Void Pointer
c#include
#include
int main()
{
int a=10;
void *p;
p=&a;
clrscr();
printf("%u",*p);
getch();
return;
}
I know that this program is wrong as error is shown on compiling it.
Anyone please provide a simple program using Void pointer in C.
Thanks in advance :)Accept two numbers from the user...
...and multiply these two numbers without using the multiplication operator!
using any loop!Function syntax
string abc = showData()["Hello"];
can somebody explain what is use of ["Hello"] after function call?
Ans