Have tried putting l=strlen(s);. Did not work out :(
Type: Posts; User: rits
Have tried putting l=strlen(s);. Did not work out :(
Guys,
Have a very simple programme for finding the string length. But whats going wrong here.
[
#include<stdio.h>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
main()
ohh sorry it works with ctrl+D. Thanks a lot...
Hi migf1,
There was a problem with permission. Now the above code works fine. if i end it with a dot. But when i removed and put EOF check condition it again does not work. The EOF for Linux is...
Hi migf1,
I have tried it again declaring ch as integer. Did not help. I have tried the below code provided by. the file myfile.txt gets created but i open it there is no content. whats going...
Hi,
Please tell why this programme does not work. I have an existing file file.txt. But the content does not get changed.
#include<stdio.h>
int main(){
FILE *fp;
char ch;
please help me in understanding these code snippets-
1)
int main ()
{
int a[2][2]={1,2,3,4};
a[1][0]=*(*(a+1)+1); // how this works??
a[1][1]=*(*(a+1)+0);
actually the Q has been asked in written test. and there was no option like compiler dependent. Anyway thanks for the reply...
Please help me in understanding this code snippet-
main()
{
int a=2,*f1,*f2;
f1=f2=&a;
*f2+=*f2+=a+=2.5;
printf("\n%d %d %d",a,*f1,*f2);
I have this code -
class A
{
public:
A(int a)
{
I have to test nos. whether it is prime or not between 1 to 30. What algorithm should i make use of???
How to find the value of z here
Int x = 5, y = 6, Z;
Z = x + + > (Z = - - Y)? Y + 2: ((x>z) ? x:y);
and why it prints 18 in the following programme-
int main()
{
can sumone help in understanding this piece of code-
main()
{
int (*functable[2])(char *format, ...) ={printf, scanf};
int i = 100;
(*functable[0])("%d", i);
...
Is it possible to overload the operator *+= such that
obj1 *+= obj2;
implies that
obj1=obj1*(obj1+obj2);
if i have a no. 895 and i have to print it in words i.e. eight nine five. i can make use of sprintf and get it printed. suppose i need to take user input for the no.and then get it printed in words...
What logic shud be used for swapping nibbles in a byte??
I am using turbo C++ IDE. and i included stdio.h
why the hell it prints 72
int main()
{
int i=0;
i=400*400/400;
printf("%d",i);
return(i);
}
how can i interchange every 2 bits in a byte like if 10 01 10 01 is input then output shud be 01 10 01 10. Please help me.
How the if condition works here?????????
void main()
{
int i;
char a[]="\0";
if(printf("%s\n",a))
printf("Ok here \n");
Thanks to both of you especially bithub for the comments...........................
Please help me in understanding the following code
main()
{
signed int bit=512, i=5;
for(;i;i--)
{
hello;
here is a piece of code-
main()
{
char *p1=“name”;
char *p2;
p2=(char*)malloc(20);
Basically wanted to ask about the use as embedded processor. I have nt heard about many projects using this. And what will be the future scope....
have anyone worked on rabbit processsor??????? exactly where it is used??? and about future scope????