**Problem :** 
Build a program that reads two strings from the keyboard and generates a third string which consists of combining two strings in such a way that the characters of the first string are placed in odd positions while the characters of the second string in even positions. The length of the new string will be twice the length of the smaller string. Display all three strings on the screen.

My solution : (I've code something, but it gives me error. Can anyone show me where is the problem?)

```
   #include <stdio.h>
#include <string.h>

int main()
{
 char str1[100], str2[100], str3[100];
 int i=0;
 int j; 
 int p;  

 printf("Give string  1: \n");
 gets(str1);
 printf("Give string  2: \n");
 gets(str2);

 if(strlen(str1)<strlen(str2)) 
    p=strlen(str1);
 else
   p=strlen(str2);

   j=0;
 for(i=0; i<p*2; i++){
   if(i%2==0)
       str3[i]=str2[j];
     else{
       str3[i]=str1[j];
       j++; }
}

 printf("\n String 3 is :  %d");
 printf("\n String 2 is :  %d");
 printf("\n String 1 is :  %d");
     return 0;
}

```
['https://Stackoverflow.com/questions/61629887', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']
So I tried searching for a better way, the site link which I was checking was a bit tricky
most stackoverflow answers mentioned about using head request to get response header, but the site I was checking returned 404 error.When I use get request the whole file is downloaded before outputing the header.My friend suggested me a solution of using the parameter `stream=True` and that really got worked.

```
import requests 
r = requests.get(link, stream=True)
print(r.headers)

```
On HTTP protocol level itself, there is no distinction between downloadable and non-downloadable URL. There is an HTTP request and there is a subsequent response. Response body can be a binary file, HTML, image etc..

You can just request the HTTP response header and look for `Content-Type:` and decide whether you want to consider that content-type as downloadable or non-downloadable.